-
1. Re: EJB 3.0 Project with 2.x entity beans
jaikiran May 22, 2013 9:10 AM (in response to marcanthony)Marc, welcome to the forums.
Marc Anthony Puca wrote:
I have an EJB 3.0 project with 3.0 session beans and would like to deploy a few 2.x entity beans in the same project, is that possible?
Yes, that's possible.
-
2. Re: EJB 3.0 Project with 2.x entity beans
marcanthony May 22, 2013 10:31 AM (in response to jaikiran)Hi jaikiran, thank you for the reply, I have tried to achieve the mentioned above but without success, the ejb 3 beans deploy whilst the entity beans do not, or better if they are deployed i cannot find them in the context
<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 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_0.xsd">
<display-name>OMS Server</display-name>
<enterprise-beans>
<entity>
<ejb-name>pkStoreEjb</ejb-name>
<local-home>server.bean.local.PkStoreLocalHome</local-home>
<local>server.bean.local.PkStoreLocal</local>
<ejb-class>server.bean.service.entity.PkStoreBean</ejb-class>
this is a chunk of the ejb-jar
and this is from the jboss.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
<enterprise-beans>
<entity>
<ejb-name>pkStoreEjb</ejb-name>
<local-jndi-name>entity/local/pkStore</local-jndi-name>
</entity>
-
3. Re: EJB 3.0 Project with 2.x entity beans
marcanthony May 23, 2013 4:04 AM (in response to marcanthony)I have tried using the xml configuration only (ejb-jar.xml and jboss.xml) for both the 3.0 session beans and the 2.0 entity beans but nothing , I also tried deploying the session beans with annotations and removing them from the xml configs but nothing
-
4. Re: EJB 3.0 Project with 2.x entity beans
rsheela Jun 11, 2013 8:24 PM (in response to marcanthony)Hi Marc,
I have the same problem packaging EJB3 sessions beans with EJB2 entity beans
did you change anything in ejb-jar.xml file for EJB2 entity beans? what are the other things did you change in ejb-jar and jboss.xml file.
Thanks,
Raj -
5. Re: EJB 3.0 Project with 2.x entity beans
marcanthony Jun 12, 2013 6:52 AM (in response to rsheela)Hi Raj
In the end I did a workaround. I created an empty ejb 2.0 project with all the ejb 2.0 related descriptors in it and added to the EAR, works nicely now
thanks
Marc