-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: multiple orm.xml files
PostPosted: Tue Dec 12, 2006 11:08 am 
Newbie

Joined: Mon Sep 20, 2004 11:09 am
Posts: 8
Hi,

is it possible to use more than one orm.xml file with hibernate entitymanager? I got an application that consists out of several ejbs, each ejb has its own orm.xml configuration file. My problem is that Hibernate seems to use only the orm.xml that is contained in the jar that the PersistenceUnitRootUrl (of the PersistenceUnitInfo) points to. orm.xml files that are contained in other jars that are referenced by the property jarFileUrl (of the PersistenceUnitInfo) are not used by hibernate. Shouldn't these files be also considered?

tia, Tobias.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 17, 2006 5:04 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
AFAIK, there should not be considered, but if you find a sentence in the spec that contradict me, please fire back.

The proper solution is to use
Code:
<mapping-file>myotherORM.xml</mapping>

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 4:17 am 
Newbie

Joined: Mon Sep 20, 2004 11:09 am
Posts: 8
hi Emmanuel,

thanks for your reply.
The document "JSR 220: Enterprise JavaBeansTM,Version 3.0 Java Persistence API" says in chapter 6.2.1.6:
Quote:
A object/relational mapping XML file named orm.xml may be specified in the META-INF directory in the root of the persistence unit or in the META-INF directory of any jar file referenced by the persistence.xml.


If I understand this correctly this means that the orm.xml files
Quote:
that are contained in other jars that are referenced by the property jarFileUrl

should be considered?

Tobias.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 9:14 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
my bad, please open a JIRA issue, I need to fix that.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 11:21 am 
Newbie

Joined: Mon Sep 20, 2004 11:09 am
Posts: 8
jira issue created: http://opensource.atlassian.com/project ... se/EJB-259


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.