[rules-users] One question about Database interface

Anstis, Michael (M.) manstis1 at ford.com
Tue Jul 8 09:30:53 EDT 2008


Hi,

Jaroslaw Kijanowski's article looks like a really good starting point
for you!

Hibernate provide Entity Manager and Annotations extensions if you want
to go the JPA route.

>From a Drool's perspective you need only concern yourself with "from"
which is documented as:-

6.5.2.8. From

The from Conditional Element allows users to specify a source for
patterns to reason over. This allows the engine to reason over data not
in the Working Memory. This could be a sub-field on a bound variable or
the results of a method call. It is a powerful construction that allows
out of the box integration with other application components and
frameworks. One common example is the integration with data retrieved
on-demand from databases using hibernate named queries.
 
For information on the rest of Jaroslaw's example, you will need to read
up on Hibernate.

With kind regards,

Mike

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Senlin Liang
Sent: 08 July 2008 13:12
To: Rules Users List
Subject: Re: [rules-users] One question about Database interface

Thanks.  Where could I find the related manual or instructions? I
searched through the doc for drools, and the email archive, there is
really no good example or explanation on how to achieve this.

(What I want is to insert, select or delete some objects in relational
database such as mysql.)

Any information is greatly appreciated.
Thanks.

On Tue, Jul 8, 2008 at 4:20 AM, Anstis, Michael (M.) <manstis1 at ford.com>
wrote:
> Have a look at an example posted earlier this week whereby somebody
> (sorry I forget who) was using JPA from within a rule.
>
> Once you understand how JPA was used then the remaining questions
relate
> more specifically to JPA.
>
> As Mark says, (native) Hibernate can also be used very easily.
>
> With kind regards,
>
> Mike
>
>
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Senlin Liang
> Sent: 08 July 2008 03:18
> To: Rules Users List
> Subject: [rules-users] One question about Database interface
>
> Hi all,
>
> Is there some convinent database interface implemented in Drools
> (store and retrieve data from DBMS, such as mysql) ?
>
> I checked the manual, and found no such information. So I am assuming
> that I will have to use JDBC. Is it right?
>
> Thanks,
> Senlin Liang
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Senlin Liang
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list