Java Reference
In-Depth Information
Element
Description
This is the enterprise application name
(
without.ear
) if your EJB has been packed in
an EAR
app-name
This is the module name (
without.jar
or
without.war
) where your EJB has been
packed
module-name
You can optionally set a distinct name for each
deployment unit
distinct-name
This is the bean's classname
bean-name
This is the fully qualified classname of the re-
mote interface
fully-qualified-
classname-of-the-remote-
interface
So the corresponding JNDI binding for your
TheatreInfo
EJB, packaged into a file
named
ticket-agency-ejb.jar
, will be:
ejb:/
ticket-agency-ejb//TheatreInfoBean!com.packtpub.as7development.chapter3.ejb.TheatreInfo
On the other hand, stateful EJBs will contain one more attribute—
?stateful
—at
the bottom of the JNDI string; this will result in the following JNDI naming structure: