Hi, typically in J2EE or JEE without spring you use standalone like app: create you context manually and manage its lifecycle. You speak about J2EE so i guess you don't have CDI but as a side note with CDI there are some project taking it into account.
Personnally i used a servletcontextlistener to build-start/stop my context and used the jndiregistry to be able to get my ejbs. - Romain 2012/7/16 Charles <cw94...@yahoo.com> > I have some Camel routes interacting with a 3rd EJB-based app. Currently > this is accomplished by > acquiring a JMS topic via JNDI and starting the Camel context in a > separate VM instance, > i.e. running Camel as a regular Java application. This is not really > convenient - I'd like to > package up Camel and the defined routes in an EJB for J2EE deployment > because most of the > application is implemented as EJB's and MBeans on JBoss. > My concerns are: > > Is it even possible? I ask because I'm pretty sure Camel creates it's own > threads and maybe > uses ThreadLocal internally. I'm no an EJB expert, but I understand that > application code > should not create it's own threads. I wonder if this is true even in > stateless session beans? > > I already searched around and the only deployment options I've seen > discussed are > standalone (java app), Spring container and OSGI container - I have found > nothing about > J2EE deployment. Any ideas? > > Thanks, > > -Charles >