Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-2109

Call to ThreadContext.enter and ThreadContext.exit is uneven in EjbObjectProxyHandler.businessMethod

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.7.1
    • Fix Version/s: 4.7.2
    • Component/s: container system
    • Labels:
    • Environment:
      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)`.

        Attachments

          Activity

            People

            • Assignee:
              romain.manni-bucau Romain Manni-Bucau
              Reporter:
              chunlinyao chunlinyao
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: