Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.7.1
-
all platform
Description
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)`.