Could someone tell me where I can find infos on the default JNDI naming for EJB 3 ?
Does Weblogic use portable JNDI names like Glassfish?
Can I find (like for Glassfish) a trace of EJB deployment with JNDI names used?
For example :
- an interface (Service) with only @Remote
- a bean (ServiceImpl) with only @Stateless implementing the interface
- everything packaged in an
.ear
file (service-application-1.0)
When deploying on Weblogic the only JNDI reference I see is:
service-application-1.0service-application-1.0_jarServiceImpl_Home
but I can't use that name with a context lookup. If I do
Service myService = (Service) context.lookup("service-application-1.0service-application-1.0_jarServiceImpl_Home");
it gives me
Exception in thread "main" java.lang.ClassCastException: weblogic.ejb.container.internal.StatelessEJBHomeImpl_1035_WLStub cannot be cast to com.tuto.Service
at com.tuto.TestEjb.main(TestEjb.java:24)
PS. With Glassfish it gives me
Portable jndi names for .... : java:global/service-application-1.0/service-application-ejb-1.0/ServiceImpl
And
Service myService = (Service) context.lookup("java:global/service-application-1.0/service-application-ejb-1.0/ServiceImpl");
is working.