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

History Log: Support JPA for WorkingMemoryDbLogger

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.1.0.M1
    • Fix Version/s: 5.1.0.CR1
    • Component/s: drools-process
    • Labels:
      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

            Assignee:
            KrisVerlaenen Kris Verlaenen
            Reporter:
            jserdaru Julien Serdaru (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: