Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] split the <mapping-file> tags across the modules into separate xml files

At the moment, we use separate jars as the mechanism for packaging. I believe you should be able to include just a persistence.xml and your mapping files in each jar. i.e. In your example:

Owning Jar could contain
- persitence.xml
- your domain classes

Child Jar 1 could contain
- minimal persistence.xml
- one.orm.xml
- two.orm.xml

Child Jar 2 could contain
- minimal persistence.xml
- three.orm.xml

etc...

I think allowing the specification of a base directory to search for orm.xml files is would make an interesting enhancement - please feel free to enter a description this enhancement in our bug system.

-Tom

On 12/10/2012 12:38 AM, bb wrote:
Is there no other way other than placing the member persistent units in
separate jars ?

Since the entities are in the same context and connect to the same DB, the
separation is only based on the owning module. The modules are
interdependent. Creating separate jars for each individual module may not be
feasible.

Also is there some way by which we can specify a directory structure from
where the orm mapping files could be picked up into a persistent unit?

for instance consider the mapping files are placed in the following dir
structure:

META-INF
	-> persistence.xml
baseDir
	-> childDir1
		 -> one.orm.xml
		 -> two.orm.xml
	-> childDir2
		 -> three.orm.xml
	-> four.orm.xml

Instead of specifying the individual mapping-file tags in the
persistence.xml, is there some way I can achieve the following : specify the
base directory structure to pick up the orm files from, in the above case it
would be "baseDir"  and all the orm files in that dir and its child
directories get picked up.





--
View this message in context: http://eclipse.1072660.n5.nabble.com/split-the-mapping-file-tags-across-the-modules-into-separate-xml-files-tp154978p155010.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top