0 Replies Latest reply on Oct 7, 2011 3:02 PM by Abbas Raza

    Seam does not inject components when spawning new thread with JBossWorkManagerTaskExecutor

    Abbas Raza Newbie

      Here is my use case. The flow happens in a jboss web container.


      1. ContA, an event scoped Controller in web layer, calls ClassA.
      2. ClassA instantiates Component CompA via org.jboss.seam.Component.getInstance(name, boolean). CompA implements javax.resource.spi.work.Work.
      3. ClassA submits CompA to JBossWorkManagerTaskExecutor in asynchronous mode.
      4. CompA has @In marked for components that need to be injected.
      5. When JBossWorkManagerTaskExecutor tries to run a method in CompA, the @In marked components are not getting injected. These components get injected if I use JBossWorkManagerTaskExecutor in synchronous mode.


      Although the application context seems to be active, Seam does not seem to find the components to inject. Is it expected behavior? Seam cannot see the components across threads?


      The environment is as follows:
      MacOS 10.5.8
      JBoss 4.3
      Seam 1.2.1


      Any help appreciated.


      Thanks!