persistence@glassfish.java.net

Extending the persistence unit

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Tue, 02 Oct 2007 16:43:42 -0400

I have a base project (base-project) that produces a jar with
persistence classes and a META-INF/persistence.xml file.

Next, I want to use a standalone test program that depends upon the
base-project.jar for persistence classes and wish to add additional
persistence.xml files (to add entity listeners and perhaps additional
persistence classes etc.).

Does the spec require that any additional persistence.xml files be in a
jar/war etc. or can it be anywhere in the classpath including under a
directory in classpath?

Specifically, is it legal to place it in META-INF/persistence.xml in any
directory on the classpath and expect it to be processed by the
Persistence provider?

TIA for your help.

-- 
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com