-
1. Re: ctx.lookup(
bill.burke Nov 9, 2004 11:46 AM (in response to iasandcb)EntityManager is currently not available outside the container as the EJB 3 Expert group has not defined a way to access the EntityManager outside the container or the rules for it.
The EJB3 expert group has also not defined how the EntityManager is available for access within a WAR or even if it is allowed to access the EntityManager outside the scope of the EJB3 jar.
FYI, the java:comp space for EJB3 is the constant:
org.jboss.ejb3.Container.ENC_CTX_NAME
We're in the process of refactoring how ENC is resolved in JBoss.
Bill -
2. Re: ctx.lookup(
iasandcb Nov 9, 2004 12:09 PM (in response to iasandcb)Thanks for your answer. In my opinion, clients also should be able to have access to EntityManager through JNDI with the predefined name java:comp/EntityManager as described at section 8.1.3 in the spec.
Ias -
3. Re: ctx.lookup(
bill.burke Nov 9, 2004 12:21 PM (in response to iasandcb)java:comp is only available on the server or within a J2EE Client Container.
I agree that EntityManager should be available outside the container. This is something the EJB3 specification should solve eventually.
Bill -
4. Re: ctx.lookup(
iasandcb Nov 9, 2004 12:39 PM (in response to iasandcb)Are there any references for using a Client Container on JBoss? I couldn't find one. (Or, just configuration for JNDI means your application runs on a client container?)
Thanks,
Ias -
5. Re: ctx.lookup(
bill.burke Nov 9, 2004 12:46 PM (in response to iasandcb)We have a client container as required by the J2EE 1.4 certification...don't ask me how to use it though :)
Bill