I am a little confused so please bear with me.
I have two persistence units myPU1 and myPU2. Each is defined in a separate jar file. I
want to get both of these persistence units into JNDI.
I also want both persistence units in the same entity manager factory (if that is
I know that I have to use one of the following properties in my persistence.xml but I am
not sure which or if I need both:
| <?xml version="1.0" encoding="UTF-8"?>
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| <persistence-unit name="myPU1" transaction-type="JTA">
| <!-- Store entity manager and factory in global JNDI -->
| <property name="jboss.entity.manager.jndi.name"
| <property name="jboss.entity.manager.factory.jndi.name"
I have another file that is identical except for the persistence unit name (myPU2). Can
I bind both of those to the same factory?
View the original post :
Reply to the post :