If you are using java:global/
, then the JNDI name should look like this:
java:global/<application>/<module>/<component>
or
java:global/<ear>/<ejb-jar>/<ejb-name>
where ear is the name of the .ear file, and ejb-jar the name of the EJB .jar file.
If you have both a local and a remote interface, you can differ using this scheme:
java:global/<ear>/<ejb-jar>/<ejb-name>!<interface>
where the interface contains the package and the interface name (example: a.b.c.ExampleEJBRemoteIfc
).
So in your setup: If myApp.ear
contains myEjb.jar
which contains an EJB whose name is ExampleEJB
, then try this JNDI name:
java:global/myApp/myEjb/ExampleEJB
or
java:global/myApp/myEjb/ExampleEJB!a.b.c.ExampleEJBRemoteIfc
Anyway, double check the JNDI name(s) in the JMX console:
http://localhost:8080/jmx-console/
- Click Service=JNDIView
- Operation list: Click invoke button
- Search in that page by the EJB name
As for comp/env vs. global: What is the relationship between java:comp/env and java:global