that's good..
but please check the transaction configurations.. because that's the problem
I think
2010/5/4 <andre.fonseca(a)mail.com>
Hi Mauricio, team
I mapped my javabean in the persistence.xml
<class>org.acme.drools.Account</class>
And after run my main test I can see the "account table" in DB, but it's
still empty, probably I am missing something in the project configuration.
Let me check and I'll reply back
Tks!
-----Original Message-----
From: andre.fonseca(a)mail.com
To: rules-users(a)lists.jboss.org
Sent: Tue, May 4, 2010 12:28 pm
Subject: Re: [rules-users] Drools + ETL Process
Hi Mauricio,
It's below, thanks!
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<persistence
version="1.0"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.drools.persistence.jpa"
transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>org.drools.persistence.session.SessionInfo</class>
<class>org.drools.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.processinstance.ProcessInstanceEventInfo</class>
<class>org.drools.persistence.processinstance.WorkItemInfo</class>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect" />
<property name="hibernate.connection.url"
value="jdbc:mysql://localhost:3306/drools" />
<property name="hibernate.connection.driver_class"
value="com.mysql.jdbc.Driver" />
<property name="hibernate.connection.password"
value="mysql" />
<property name="hibernate.connection.username"
value="root" />
<property name="hibernate.hbm2ddl.auto"
value="create-drop" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.BTMTransactionManagerLookup" />
</properties>
</persistence-unit>
</persistence>
-----Original Message-----
From: Mauricio Salatino <salaboy(a)gmail.com>
To: Rules Users List <rules-users(a)lists.jboss.org>
Sent: Mon, May 3, 2010 11:24 pm
Subject: Re: [rules-users] Drools + ETL Process
Hi man,
can you show us your persistence.xml file where it's defined
org.drools.persistence.jpa
Persistence Unit?
2010/5/3 <andre.fonseca(a)mail.com>
>
> Hi Mauricio, thanks for your reply
>
> I have commented the transaction , please check
>
http://pastebin.com/NxQyft2t
> I put the hibernate log there too.
>
> There is no error, after the first time executed I have the tables created
> in mysql
>
> | processinstanceeventinfo |
> | processinstanceinfo |
> | processinstanceinfo_eventtypes |
> | sessioninfo |
> | workiteminfo |
>
> but they are empty, this is because I am not creating a process just rules
> and facts?
>
> the drools expert knowlege database persist rules and facts or this is
> maintained only in the working memory?
>
> TIA
>
>
>
>
> -----Original Message-----
> From: Mauricio Salatino <salaboy(a)gmail.com>
> To: Rules Users List <rules-users(a)lists.jboss.org>
> Sent: Sun, May 2, 2010 11:16 pm
> Subject: Re: [rules-users] Drools + ETL Process
>
> Ok looks nice.. but you shouldn't begin and commit the transaction. If
> you remove that.. do you have some error?
>
> 2010/5/2 <andre.fonseca(a)mail.com>
>
>> Hi Mauricio,
>>
>> Sorry if I was not clear. I have already installed Guvnor, and I have
>> also changed repository.xml to persist data in MySQL.
>> But I dont want to use Guvnor, I would like to author the rules and facts
>> in Eclipse using Drools plugin ( I have also installed it ) and persist data
>> in MySQL.
>> That's because I'm trying to use JPAKnowlegeService
>> Could you please take a look in the code of pastebin?
>>
>> TIA
>>
>>
>> -----Original Message-----
>> From: Mauricio Salatino <salaboy(a)gmail.com>
>> To: Rules Users List <rules-users(a)lists.jboss.org>
>> Sent: Fri, Apr 30, 2010 6:54 pm
>> Subject: Re: [rules-users] Drools + ETL Process
>>
>> Hi man,
>> you are mixing a lot of stuff here..
>> I will recommend you the following steps for achieving the steps that you
>> are mentioning
>> 1) Install guvnor
>> 2) author the rules inside it.. (it already contains a JCR repository,
>> that is similar to a database, it will allow you to store rules there), you
>> can also author some objects (fact model) inside guvnor.
>> 3) Then you can create tests to execute the rules and see which rules are
>> fired.
>>
>> Greetings, hope it helps!
>> 2010/4/30 <andre.fonseca(a)mail.com>
>>
>>>
>>> Hi Esteban,
>>>
>>> Sorry, I have only one week looking into Drools =)
>>> Yes, I am talking about Drools Expert Database
>>>
>>> Looking into this
>>>
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/droo...
tried a sample snippet
>>>
>>>
http://pastebin.com/uJd5642D
>>>
>>> But its incomplete, for example, I need to create the Rule in the
>>> database also
>>>
>>> The things that I need to do are:
>>> 1) Create Rule and Object Facts in Java and persist them in the Drools
>>> Expert Database
>>> 2) Check in the Guvnor Interface the Rules and Facts created in the step
>>> before
>>> 2) Fire the Rules created and get the response
>>>
>>> Is there someone that have experience using JPA persistence with
>>> Drools? I already have a simple project configured using JPA and Hibernate
>>> but I still don't know how to proceed =(
>>>
>>> Thanks In Advance !
>>> -----Original Message-----
>>> From: Esteban Aliverti <esteban.aliverti(a)gmail.com>
>>> To: Rules Users List <rules-users(a)lists.jboss.org>
>>> Sent: Thu, Apr 29, 2010 9:02 pm
>>> Subject: Re: [rules-users] Drools + ETL Process
>>>
>>> Which drools database are you talking about? If you just want to use
>>> drools expert, you don't need any db. If you want to persist your kbase
or
>>> rules, feel free to use whatever mechanism you want.
>>>
>>> 2010/4/28 <andre.fonseca(a)mail.com>
>>>
>>>>
>>>> Hi all,
>>>>
>>>> I am using Drools 5.0 with Tomcat 6 and MySQL.
>>>>
>>>> Now I need to insert data in the drools database but I DON'T want to
>>>> use the Guvnor interface.
>>>> This is because in the future we'll need to use a kind of ETL
process
>>>> to populate the drools database.
>>>>
>>>> Should I create a java class with JDBC access and perform a SQL direct
>>>> to that tables?
>>>> I did the reverse engineering of the drools database but I could not
>>>> understood yet where the data are persisted.
>>>>
>>>> Any advice should be very helpful.
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>> _______________________________________________
>>>> rules-users mailing list
>>>> rules-users(a)lists.jboss.org
>>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>>
>>>
>>>
>>> --
>>> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>>>
>>> Esteban Aliverti
>>>
>>> _______________________________________________
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> rules-users mailing list
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> rules-users(a)lists.jboss.org
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>
>>
>> --
>> -
http://salaboy.wordpress.com
>> -
http://www.jbug.com.ar
>> - Salatino "Salaboy" Mauricio -
>>
>> _______________________________________________
>>
>>
>>
>>
>>
>>
>>
>>
>> rules-users mailing list
>>
>>
>>
>>
>>
>>
>>
>> rules-users(a)lists.jboss.org
>>
>>
>>
>>
>>
>>
>>
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
>
> --
> -
http://salaboy.wordpress.com
> -
http://www.jbug.com.ar
> - Salatino "Salaboy" Mauricio -
>
> _______________________________________________
>
>
>
>
> rules-users mailing list
>
>
>
> rules-users(a)lists.jboss.org
>
>
>
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
-
http://salaboy.wordpress.com
-
http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users