Portable global JNDI name

06 April 2014

Default syntax

Per the EJB 3.1 Specification, each session bean is assigned a unique JNDI name within the java:global namespace.

java:global[/<app-name>]/<module-name>/<bean-name>

The portion is only present if the application is deployed as an .ear file. In that case, defaults to the unqualified name of the .ear file, minus the file extension. The can be explicitly specified using the element in application.xml.

defaults to the unqualified name of the ejb-jar file or .war file in which the EJB component is defined, minus the file extension. The can be explicitly specified using the element of the ejb-jar.xml (for ejb-jars) or web.xml(for EJB components defined in .wars).

corresponds to the session bean's EJB name. It defaults to the unqualified name of the session bean class. It can be explicitly specified using the name attribute of the @Stateless/@Stateful/@Singleton annotation. Alternatively, if the ejb-jar.xml is being used to define the component, corresponds to the element of ejb-jar.xml.

comments powered by Disqus