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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.7.1
    • 4.7.2
    • container system
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: