Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2529

History Log: Support JPA for WorkingMemoryDbLogger

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 5.1.0.CR1
    • 5.1.0.M1
    • drools-process
    • None

    Description

      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

      Attachments

        Activity

          People

            kverlaen@redhat.com Kris Verlaenen
            jserdaru_jira Julien Serdaru (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty