Hi Mike,
I have a question regarding root of EAR scoped persistence unit.
Referring the packaging proposal dated 19 Oct 2005, I see the following
being mentioned in the spec:
A persistence unit is defined by a persistence.xml file. The jar file or
directory whose
META-INF directory contains the persistence.xml file is termed the root
of the persistence unit.
In Java EE, the root of a persistence unit may be one of the following:
• ...
• a jar file in the root of the EAR
• a jar file in the EAR lib directory
• ...
I have an structure like this:
app.ear (lib is designated as the library dir)
par1.jar
lib/par2.jar
some_arbitrary_dir/par3.jar
some_arbitrary_dir/ejb.jar
where, par1.jar, par2.jar & par3.jar contain META-INF/persistence.xml
and neither of them is an ejb-jar or app-client-jar.
What are the ear scoped PU Roots defined here?
a) par1.jar, lib/par2.jar, some_arbitrary_dir/par3.jar
OR
b) par1.jar, lib/par2.jar
If the answer is #b, then why do we not give user the flexibility to
organise their ear scoped persistence-units in any arbitrary directory
structures, just like they can organise their ejb-jar, war, rar or
appclient-jars in any arbitrary directory structures inside the ear?
Thanks,
Sahoo