UserTransaction may be in wrong state after ejb >> ejb call
-----------------------------------------------------------

         Key: GERONIMO-1556
         URL: http://issues.apache.org/jira/browse/GERONIMO-1556
     Project: Geronimo
        Type: Bug
  Components: OpenEJB  
    Versions: 1.1    
    Reporter: David Jencks


UserTransactionImpl has a thread local that holds the current UT state, online 
or offline.  Currently we are unconditionally setting UT state to offline when 
leaving a method call.  This is fine as long as the same UT threadlocal 
instance is never used for 2 ejb calls in the same thread.  We have separate UT 
instances for each ejb.  However, it is still possible if an ejb calls "itself" 
to reuse the UT.  So, it we have a call A to A, after the call returns, UT will 
be offline in the first A.  

The solution is to read the state of UT on the way in to the method call and to 
reset it on the way back out.  This is what the timer state does.

As a consequence, we will be able to share the same UT instance over all ejbs, 
at least within an ejb application.

The relevant code is in AbstractMethodOperation, and the implementations of 
EJBInstanceContext.setOperation.
.

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

Reply via email to