[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2529) History Log: Support JPA for WorkingMemoryDbLogger

Kris Verlaenen (JIRA) jira-events at lists.jboss.org
Wed Jun 23 22:36:46 EDT 2010


    [ https://jira.jboss.org/browse/JBRULES-2529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12536871#action_12536871 ] 

Kris Verlaenen commented on JBRULES-2529:
-----------------------------------------

Thanks for this contribution, just checked in a version based on this in trunk, hope you can (re)use it.

So now you can choose between the old hibernate-based (for test or when not using persistence) and the new JPA-based (when using JPA persistence) implementation.

> History Log: Support JPA for WorkingMemoryDbLogger
> --------------------------------------------------
>
>                 Key: JBRULES-2529
>                 URL: https://jira.jboss.org/browse/JBRULES-2529
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: drools-process
>    Affects Versions: 5.1.0.M1
>            Reporter: Julien Serdaru
>            Assignee: Kris Verlaenen
>             Fix For: 5.1.0.CR1
>
>         Attachments: JPAWorkingMemoryDbLogger.java, NodeInstanceLog.java, ProcessInstanceLog.java
>
>
> After a discussion on #drools with krisv, I'm opening the following feature request to enable the use of the History Log in JPA. 
> I would like to be able to use WorkingMemoryDbLogger in a JPA environment. However, org.drools.process.audit.NodeInstanceLog and org.drools.process.audit.ProcessInstanceLog should be annotated with @Entity and relevant annotations to enable out of the box history log with JPA.
> I tried a bypass by creating my own version of NodeInstanceLog and ProcessInstanceLog, refering to them in my persistence.xml. The tables get created fine, but I get an exception in WorkingMemoryDbLogger, which makes direct use of the hibernate session:
> [main] WARN  l.SessionFactoryImpl - JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
> Hibernate: insert into ProcessInstanceLog (id, processInstanceId, processId, START_DATE, END_DATE) values (null, ?, ?, ?, ?)[main] ERROR tion.JDBCTransaction - Could not toggle autocommit
> java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list