Showing posts with label EJB 3.1 spec.JNDI names for EJB. Show all posts
Showing posts with label EJB 3.1 spec.JNDI names for EJB. Show all posts

Portable JNDI names in EJB 3.1

Java EE 6 made some efforts to standardize JNDI names at global,application, and module levels. Now EJB deployed to EJB-3.1-capable server will have various standard JNDI names registered. EJB 3.1 spec defines the following 3 levels of JNDI names for EJB:

Global JNDI name:
java:global[/]//[!]
Application-scope JNDI name:
java:app//[!]
Module-scope JNDI name:
java:module/[!]
The following exampels shows various EJB JNDI names, depending upon how the EJB is packaged, its business interface(s), and bean class:

Bean class: test.TestBean
business interface: none