On Fri, Feb 8, 2013 at 6:01 PM, Romain Manni-Bucau <rmannibu...@gmail.com> wrote: > jWorkManager or WorkManager? > > the last one is part of JavaEE but does not have contraints on injections > AFAIK so it doesn't really helps IMO >
WorkMananger is for thread pools. Not for IoC / bean injections etc. So it DOES help, if you want to let the container manage all threads. Though it requires that any 3rd party framework supports this API or offers a hook to inject with jWorkManager. The latter does Camel. And there may be something for Spring etc. But I hardly see anybody use that. Camel / Spring / etc works perfect in JEE containers. > the best is to get resources from where you need (lookup, BeanProvider from > deltaspike...) with a correct scope (not requestscoped for instance which > has no real sense in such a thread) > > Note: deltaspike has a kind of cdicontroller to allow to get scoped cdi > beans in batches, maybe something to have a look on > > *Romain Manni-Bucau* > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > *Github: https://github.com/rmannibucau* > > > > 2013/2/8 Claus Ibsen <claus.ib...@gmail.com> > >> On Fri, Feb 8, 2013 at 2:03 PM, Harald Wellmann <hwellmann...@gmail.com> >> wrote: >> > It it safe to use SJMS or JMS in a Java EE 6 application? >> > >> >> Yes, a lot of users is using Spring JMS / Camel / And a zillion other >> frameworks in JEE servers such as WebLogic, WebSphere etc. >> And has no trouble at all. >> >> Though there is an API called jWorkManager which you can implement and >> plugin to a JEE container (if it supports that) >> Then you can let the JEE server manage the threads. >> >> Camel allows you to plugin a custom thread pool manager so you can use >> that jWorkManager. >> >> We had some people in the community working on that for their WebLogic >> server. But they kinda just dropped that >> as it works flawless without doing that. >> >> >> >> > You are not supposed to start threads in Java EE, but (S)JMS uses >> > thread pools for consumers. Is it guaranteed that features like >> > resource or CDI injection, CDI scopes, JNDI lookup will work in these >> > these threads just the same as in a container-managed thread? >> > >> > Isn't it true that MDBs are the only official way to asynchronously >> > consume JMS messages in a Java EE application? Does SJMS have any >> > adapters for MDBs? >> > >> > (I'm mainly interested in SJMS, but I believe the same issues apply to >> > the Spring-based JMS component.) >> > >> > Best regards, >> > Harald >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> FuseSource is now part of Red Hat >> Email: cib...@redhat.com >> Web: http://fusesource.com >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen