-
1. Re: Migrating EJB 2.0 on JBoss AS 7.1CR1
jaikiran Jan 28, 2012 9:06 AM (in response to aupadhyaya2002)antar Upadhyaya wrote:
I have got below entries in jboss.xml
<session>
<ejb-name>StaticDataController</ejb-name>
<jndi-name>com/ebrd/tcc/StaticDataController</jndi-name>
</session>AS7 no longer supports jboss.xml. You'll need a jboss-ejb3.xml. Furthermore, the jboss-ejb3.xml does not support the jndi-name element to bind to custom JNDI names. Instead, you can use the following approach/trick in ejb-jar.xml to bind to custom JNDI names in the java:global JNDI namespace:
<ejb-jar> <!-- Use the correct dtd/xsd here --> <enterprise-beans> <session> <ejb-name>SimpleBean</ejb-name> <home>org.jboss.as.test.integration.ejb.injection.ejbref.HomeInterface</home> <remote>org.jboss.as.test.integration.ejb.injection.ejbref.RemoteInterface</remote> <local-home>org.jboss.as.test.integration.ejb.injection.ejbref.LocalHomeInterface</local-home> <local>org.jboss.as.test.integration.ejb.injection.ejbref.LocalInterface</local> <ejb-class>org.jboss.as.test.integration.ejb.injection.ejbref.SimpleBean</ejb-class> <session-type>Stateless</session-type> <ejb-ref> <ejb-ref-name>java:global/MyCustomJNDIName</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>org.jboss.as.test.integration.ejb.injection.ejbref.HomeInterface</home> <remote>org.jboss.as.test.integration.ejb.injection.ejbref.RemoteInterface</remote> </ejb-ref> </session> ...
I haven't given it a try. See if it works for you.
antar Upadhyaya wrote:
I would like to know whether we can use EJB 2 in JBoss 7.1CR1.
Yes
-
2. Re: Migrating EJB 2.0 on JBoss AS 7.1CR1
ehugonnet Feb 23, 2012 2:46 AM (in response to jaikiran)Do we have to migrate the code also ? Or is rewritting the EJB descriptors the 'only' work we have to do ?
-
3. Re: Migrating EJB 2.0 on JBoss AS 7.1CR1
jaikiran Feb 23, 2012 2:49 AM (in response to ehugonnet)If your application was using spec specified APIs then you don't need any change. However, if your application had any server specific code then it will have to be reviewed in context of AS7.
-
4. Re: Migrating EJB 2.0 on JBoss AS 7.1CR1
ehugonnet Feb 23, 2012 2:53 AM (in response to jaikiran)That is fast answer !!
The code is 'per the specs' as it was running in a least 2 different containers.
So I need to migrate my jboss deployement descriptors.
Cool