-
1. Re: forcing jndi names for ejb
sfcoy Sep 27, 2012 6:16 AM (in response to mperelma)You need to use a jboss-ejb3.xml file in JBoss 7.x. See the docs/schema directory.
I think you can also use mapped-name in a 3.1 version of ejb-jar.xml.
-
2. Re: forcing jndi names for ejb
mperelma Sep 28, 2012 1:41 AM (in response to sfcoy)Stephen,
i replaced my jboss.xml with jboss-ejb3.xml. in addition to that, i am now starting my jboss 7.1.1 instance using full profile. however, the jndi name specified under <jndi-name> still does not take effect. here are the deployment descriptors i am using:
ejb-jar.xml:
<ejb-jar xmlns = "http://java.sun.com/xml/ns/javaee"
version = "3.1"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
<enterprise-beans>
<session id="SessionCore-1">
<ejb-name>MyEJB</ejb-name>
<home>com.foo.blah.MyEJBHome</home>
<remote>com.foo.blah.MyEJB</remote>
<ejb-class>com.foo.blah.MyEJBBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-bean>
</ejb-jar>
jboss-ejb3.xml:
<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.xsdof
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>
is there an official statement as to whether or not jboss 7.1.1 supports custom jndi names for ejbs?
-
3. Re: forcing jndi names for ejb
xin.zhang.song Sep 28, 2012 1:46 AM (in response to mperelma)AS7.1.1 does not support the custom JNDI. if you want to do this, you can use the naming subsystem to custom JNDI, for example:
<subsystem xmlns="urn:jboss:domain:naming:1.1">
<bindings>
<lookup name="java:/bv/bv_framework/ejb/GenseqHome" lookup="java:jboss/exported/bvf/bv_com_ejb/GenseqHome!com.broadvision.genseq.ejb.GenseqHome"/>
</bindings>
</subsystem>
-
4. Re: forcing jndi names for ejb
mperelma Sep 28, 2012 5:13 PM (in response to xin.zhang.song)does it not support custom jndi naming in order to comply with j2ee 6 spec?