I'm using JBoss 4.2.3 and I deployed two ears called triad-1.0.ear
and reportservices-1.0.ear
, the thing is that I want to use the entity manager of the project triad in the project reportservices. This is the architecture JBoss follows:
triad-1.0.ear:
triad-core-1.0.jar:
META-INF:
MANIFEST.MF
components.xml
ejb-jar.xml
jboss.xml
persistence.xml
reportservices-1.0.ear:
reportservices-core-1.0.jar:
META-INF:
MANIFEST.MF
components.xml
ejb-jar.xml
jboss.xml
persistence.xml
this is my attempt to make the entitymanager global between ear in the persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Attention: Generated code! Do not modify by hand!
Generated by: persistence.xml.vsl in andromda-ejb3-cartridge.
-->
<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="triad">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/jdbc/triad</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
<property name="jboss.entity.manager.jndi.name" value="java:/triadFactory"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:/triadFactory"/>
</properties>
</persistence-unit>
</persistence>