Answer to myself (we need an edit function):
No, even changing the persistence-names will not fix the issue.
Here is the content of one persistence.xml (besides the different persistence-names they
are all the same).
| <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="user-management">
| <!-- use the JNDI name here!! -->
| <jta-data-source>java:/FruitDS</jta-data-source>
| <mapping-file>META-INF/orm.xml</mapping-file>
| <properties>
| <property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
|
| <property name="hibernate.cache.use_query_cache"
value="true"/>
| <property name="hibernate.cache.provider_class"
value="org.jboss.ejb3.entity.TreeCacheProviderHook" />
| <property name="hibernate.treecache.mbean.object_name"
value="jboss.cache:service=EJB3EntityTreeCache" />
|
| </properties>
| </persistence-unit>
| </persistence>
|
and the matching orm.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <entity-mappings
xmlns="http://java.sun.com/xml/ns/persistence/orm"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
orm_1_0.xsd"
| version="1.0">
| <persistence-unit-metadata>
| <persistence-unit-defaults>
| <schema>public</schema>
| </persistence-unit-defaults>
| </persistence-unit-metadata>
|
| <entity class="my.test.dom.Action">
| <table name="actions"/>
| <attributes>
| <id name="id">
| <column name="ID"/>
| <generated-value/>
| </id>
| <basic name="userId">
| <column name="user_id"/>
| </basic>
| <basic name="method">
| <column name="method"/>
| </basic>
| </attributes>
| </entity>
|
| <entity class="my.test.dom.User">
| <table name="users"/>
| <attributes>
| <id name="id">
| <column name="ID"/>
| <generated-value/>
| </id>
| <basic name="name">
| <column name="NAME"/>
| </basic>
| </attributes>
| </entity>
|
| </entity-mappings>
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210615#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...