You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "chunlinyao (JIRA)" <ji...@apache.org> on 2014/12/10 03:30:12 UTC

[jira] [Created] (OPENEJB-2109) Call to ThreadContext.enter and ThreadContext.exit is uneven in EjbObjectProxyHandler.businessMethod

chunlinyao created OPENEJB-2109:
-----------------------------------

             Summary: Call to ThreadContext.enter and ThreadContext.exit is uneven in EjbObjectProxyHandler.businessMethod
                 Key: OPENEJB-2109
                 URL: https://issues.apache.org/jira/browse/OPENEJB-2109
             Project: OpenEJB
          Issue Type: Bug
          Components: container system
    Affects Versions: 4.7.1
         Environment: all platform
            Reporter: chunlinyao


When calling asynch ejb method. The ThreadContext.enter is called conditionally based on `if (threadContext != null)` but ThreadContext.exit is called conditionally based on `if (oldCtx != null)`. So If oldCtx is null, after run async ejb method, the thread will keep the ThreadContext. Next time this thread run another async ejb call, when it call ThreadContext.enter, It has an oldCtx and AbstractSecurityService will copy SecurityContext from oldCtx to new ThreadContext. Maybe ThreadContext.exit should be called conditionally based on `if (threadContext != null)`. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)