Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3883

Fix for JBPM-2983 broke externally managed transactions support

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • jBPM 3.2.x
    • jBPM 3.2.13
    • Persistence
    • None

      The fix for JBPM-2983 broke jBPM ability to handle externally managed transactions. In fact the changeset r6862:

      1. removed the DbPersistenceService.isTransactionPresent() method, which tested if no transaction was ever created (and this is the case for externally managed transactions)
      2. added a lot of checks for DbPersistenceService.isTransactionActive() (without any accompanying check for isTransactionPresent()), which can be true only when jBPM itself manages transactions, unless you use a JtaDbPersistenceService

      The problem is that DbPersistenceService.isTransactionActive() only means "is there a currently active transaction I started?", rather than "does exist any currently active transaction for the current context".

      I think that the fix for JBPM-2983 is not completely correct: in fact, if transactions are managed externally and there is no open transaction, jBPM should really complain by throwing an exception, because it's my fault.

            marco.rietveld Marco Rietveld (Inactive)
            mauromol_jira Mauro Molinari (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: