Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-1687

CDI Request Scope does not work in Job Executor Threads on WLS

    • Icon: Bug Report Bug Report
    • Resolution: Unresolved
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • engine

      Problem Description
      ===============

      @RequestScoped CDI Beans cannot be used from Job Executor Threads. This affects

      • @RequestScoped CDI Beans invoked from service tasks or Listeners after Timers
      • @RequestScoped CDI Beans invoked from service tasks or Listeners after asynchronous continuations

      The following engine-integration tests are affected and excluded form CI at the moment:

      • `JobExecutorRequestContextTest`
      • `JobExecutorRequestContextLocalInvocationTest`
      • `JobExecutorRequestContextSFSBDelegateTest`

      The testcase `JobExecutorRequestContextRemoteInvocationTest` works since in that case we invoke a Remote Business interface of an EJB in which case the weblogic seems to correctly open and scope the Request Context.

      Suspected Reason
      ==============

      The reason is that Weblogic does not associate a RequestScope with the current thread upon the invocation of an MDB. The Java EE 6 Spec mandates this but Weblogic does not seem to implement this correctly

      Proposed Workaround(s)
      ==================

      • Wait / push for bugfix in Weblogic
      • use JBoss Weld API directly to control the request scope oursselves

        This is the controller panel for Smart Panels app

            [CAM-1687] CDI Request Scope does not work in Job Executor Threads on WLS

            Daniel Meyer created issue -
            Daniel Meyer made changes -
            Description Original: Problem Description
            ===============

            @RequestScoped CDI Beans cannot be used from Job Executor Threads. This affects

            * @RequestScoped CDI Beans invoked from service tasks or Listeners after Timers
            * @RequestScoped CDI Beans invoked from service tasks or Listeners after asynchronous continuations

            Suspected Reason
            ==============

            The reason is that Weblogic does not associate a RequestScope with the current thread upon the invocation of an MDB. The Java EE 6 Spec mandates this but Weblogic does not seem to implement this correctly

            Proposed Workaround(s)
            ==================

            * Wait / push for bugfix in Weblogic :)
            * use JBoss Weld API directly to control the request scope oursselves
            New: Problem Description
            ===============

            @RequestScoped CDI Beans cannot be used from Job Executor Threads. This affects

            * @RequestScoped CDI Beans invoked from service tasks or Listeners after Timers
            * @RequestScoped CDI Beans invoked from service tasks or Listeners after asynchronous continuations

            The following engine-integration tests are affected and excluded form CI at the moment:

            * JobExecutorRequestContextTest
            * JobExecutorRequestContextLocalInvocationTest
            * JobExecutorRequestContextSFSBDelegateTest

            The testcase JobExecutorRequestContextRemoteInvocationTest works since in that case we invoke a Remote Business interface of an EJB in which case the weblogic seems to correctly open and scope the Request Context.

            Suspected Reason
            ==============

            The reason is that Weblogic does not associate a RequestScope with the current thread upon the invocation of an MDB. The Java EE 6 Spec mandates this but Weblogic does not seem to implement this correctly

            Proposed Workaround(s)
            ==================

            * Wait / push for bugfix in Weblogic :)
            * use JBoss Weld API directly to control the request scope oursselves
            Daniel Meyer made changes -
            Description Original: Problem Description
            ===============

            @RequestScoped CDI Beans cannot be used from Job Executor Threads. This affects

            * @RequestScoped CDI Beans invoked from service tasks or Listeners after Timers
            * @RequestScoped CDI Beans invoked from service tasks or Listeners after asynchronous continuations

            The following engine-integration tests are affected and excluded form CI at the moment:

            * JobExecutorRequestContextTest
            * JobExecutorRequestContextLocalInvocationTest
            * JobExecutorRequestContextSFSBDelegateTest

            The testcase JobExecutorRequestContextRemoteInvocationTest works since in that case we invoke a Remote Business interface of an EJB in which case the weblogic seems to correctly open and scope the Request Context.

            Suspected Reason
            ==============

            The reason is that Weblogic does not associate a RequestScope with the current thread upon the invocation of an MDB. The Java EE 6 Spec mandates this but Weblogic does not seem to implement this correctly

            Proposed Workaround(s)
            ==================

            * Wait / push for bugfix in Weblogic :)
            * use JBoss Weld API directly to control the request scope oursselves
            New: Problem Description
            ===============

            @RequestScoped CDI Beans cannot be used from Job Executor Threads. This affects

            * @RequestScoped CDI Beans invoked from service tasks or Listeners after Timers
            * @RequestScoped CDI Beans invoked from service tasks or Listeners after asynchronous continuations

            The following engine-integration tests are affected and excluded form CI at the moment:

            * `JobExecutorRequestContextTest`
            * `JobExecutorRequestContextLocalInvocationTest`
            * `JobExecutorRequestContextSFSBDelegateTest`

            The testcase `JobExecutorRequestContextRemoteInvocationTest` works since in that case we invoke a Remote Business interface of an EJB in which case the weblogic seems to correctly open and scope the Request Context.

            Suspected Reason
            ==============

            The reason is that Weblogic does not associate a RequestScope with the current thread upon the invocation of an MDB. The Java EE 6 Spec mandates this but Weblogic does not seem to implement this correctly

            Proposed Workaround(s)
            ==================

            * Wait / push for bugfix in Weblogic :)
            * use JBoss Weld API directly to control the request scope oursselves
            Robert Gimbel made changes -
            Rank New: Ranked higher
            Daniel Meyer made changes -
            Rank New: Ranked lower
            Daniel Meyer made changes -
            Rank New: Ranked lower
            Daniel Meyer made changes -
            Fix Version/s Original: 7.1.0 [ 12891 ]
            Robert Gimbel made changes -
            Component/s Original: maintenance [ 11750 ]
            Thorben Lindhauer made changes -
            Workflow Original: camunda BPM [ 25696 ] New: Backup_camunda BPM [ 55160 ]

            This ticket was migrated to github: https://github.com/camunda/camunda-bpm-platform/issues/2151. Please use this link for any future references and continue any discussion there.

            Thorben Lindhauer added a comment - This ticket was migrated to github: https://github.com/camunda/camunda-bpm-platform/issues/2151 . Please use this link for any future references and continue any discussion there.

              Unassigned Unassigned
              meyer Daniel Meyer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: