jaikiran wrote : Which version of JBoss do you use? I tested this on my local
JBoss-4.2.2 setup with an sample application:
|
JBoss-4.0.5 with extra EJB3 support.
I have tested it on JBoss-4.2.2, and it works fine there. So we will need to
update our EJB3 component, or upgrade JBoss
I have a simple EJB3 session bean with EJB3 annotations to define external
resources in the JNDI tree. Problem is that the lookup only works if I use the
SessionContext, without the java:comp/env prefix, but NOT with
InitialContext(), including the prefix. The latter version throws a
jaikiran wrote :
| It depends on where you are doing the lookup using the InitialContext. Is
this being done in the same bean where the @Resource is defined? In which case,
this should work. However, if you are doing the lookup in some other component
of your application, then this wont