Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-3276

JCA Adapter not handling transaction suspension correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.11, 2.4
    • Fix Version/s: 2.6.1, 2.7
    • Component/s: jackrabbit-jca
    • Labels:
      None
    • Environment:
      Weblogic 10.3.5

      Description

      The JCA Adapter does not distinguish the case where a Container just wants to suspend the current transaction and closes the connection handle in any case.
      The attached patch just checks if the container wants to suspend the current transaction and does not close the connection handle in this case.

      1. JCR-3276.diff
        3 kB
        Daniel Hasler

        Activity

        Hide
        Roland Stamm added a comment -

        I am having the same problem with Weblogic 10.3.3 when using a nested transaction. (works fine on Jboss 5.1)

        Scenario:
        tx #1 begin()
        do user session work
        tx #1 suspend()
        tx #2 begin()
        do admin session work
        tx #2 commit()
        tx #1 resume()
        do user session work
        tx #1 commit()

        When tx #1 should resume I am getting following exception:

        Caused by: java.lang.IllegalStateException: Inactive logical session handle called
        	at org.apache.jackrabbit.jca.JCAManagedConnection.getSession(JCAManagedConnection.java:350)
        	at org.apache.jackrabbit.jca.JCASessionHandle.getSession(JCASessionHandle.java:90)
        	at org.apache.jackrabbit.jca.JCASessionHandle.getWorkspace(JCASessionHandle.java:125)
        

        When using the supplied patch resuming tx #1 works.

        Show
        Roland Stamm added a comment - I am having the same problem with Weblogic 10.3.3 when using a nested transaction. (works fine on Jboss 5.1) Scenario: tx #1 begin() do user session work tx #1 suspend() tx #2 begin() do admin session work tx #2 commit() tx #1 resume() do user session work tx #1 commit() When tx #1 should resume I am getting following exception: Caused by: java.lang.IllegalStateException: Inactive logical session handle called at org.apache.jackrabbit.jca.JCAManagedConnection.getSession(JCAManagedConnection.java:350) at org.apache.jackrabbit.jca.JCASessionHandle.getSession(JCASessionHandle.java:90) at org.apache.jackrabbit.jca.JCASessionHandle.getWorkspace(JCASessionHandle.java:125) When using the supplied patch resuming tx #1 works.
        Hide
        Claus Köll added a comment - - edited

        There is already a patch ... i will have a look at it.

        Show
        Claus Köll added a comment - - edited There is already a patch ... i will have a look at it.
        Hide
        Claus Köll added a comment -

        Thanks for patch ..
        Committed in revision 1461020.

        Show
        Claus Köll added a comment - Thanks for patch .. Committed in revision 1461020.
        Hide
        Claus Köll added a comment -

        Backport to 2.6.x branch in revision 1461022

        Show
        Claus Köll added a comment - Backport to 2.6.x branch in revision 1461022

          People

          • Assignee:
            Claus Köll
            Reporter:
            Daniel Hasler
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development