it is possible to name a bean in Deployment Descriptor in the way
or is only an 'unqualified' name like
allowed? I ask because the annotation @Stateless(name="ejb/funnyBean") seems to be ok but the above entry in Deployment Descriptor results in an error (jboss 4.2). According to the specification the element name of @Stateless is equivalent to <ejb-name> .
Thanks for your help,
Benoît de Chateauvieux
posted 8 years ago
Note that the name attribute of the @Stateless annotation isn't the JNDI name but the ejb-name. Generally, the ejb-name is 'unqualified'.
From EJB3 specs (19.2):
Enterprise bean�s name. A logical name is assigned to each enterprise bean in the ejb-jar file. There is no architected relationship between this name and the JNDI name that the Deployer will assign to the enterprise bean. The Bean Provider can specify the enterprise bean�s name in the ejb-name element. If the enterprise bean�s name is not explicitly specified in metadata annotations or in the deployment descriptor, it defaults to the unqualified name of the bean class.
The deployer binds the EJB to a JNDI registry with a container's tool.
SCJP5 | SCBCD5 | SCEA5 Part 1
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads