Reputation: 145
my web application contains a few 2.x stateful and stateless session ejbs. but unlike previous jboss versions (as well as other major app servers), i am unable to specify an ejb jndi name in jboss 7.1.1. i have followed their docs by eliminating jboss.xml in favor of jboss-ejb3.xml, as well as starting the app server in full profile mode.
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
version="3.1"
impl-version="2.0">
<enterprise-beans>
<session>
<ejb-name>MyEJB</ejb-name>
<jndi-name>MyEJB_JNDI_NAME</jndi-name>
</session>
</enterprise-beans>
</jboss:ejb-jar>
however, the jndi-name in jboss-ejb3.xml is not taking hold, preventing me from setting my own custom ejb jndi name. does anyone know how to do this right?
Upvotes: 2
Views: 11571
Reputation: 1665
<jndi-name>
is no longer supported in JBoss AS 7. From this JIRA:
In AS7 we no longer support binding to custom JNDI names for EJBs. So the beans are always bound to the spec mandated java:global, java:app and java:module namespaces. The
<jndi-name>
for the session bean element is no longer supported.
Upvotes: 7