Joined: Thu Sep 14, 2006 12:08 pm Posts: 19
|
I have a base project (base-project) that produces a jar with persistence classes and a META-INF/persistence.xml file.
I then have an extension project (ext-project) that depends upon the base-project.jar and wishes to add additional persistence.xml files to add entity listeners and perhaps additional persistence classes etc.
I cannot seem to get the ext-project's persistence.xml file to be processed by hibernate code no matter where I place it. I can tell this by looking at TRACE logs emitted by hibernate:
TRACE Ejb3Configuration:214 - Analyse of persistence.xml: jar:file:...base-project.jar!/META-INF/persistence.xml
and not seeing any similar message for the 2nd persistence.xml in ext-project.
I suspect that I am not placing the file in the correct location and it is therefor being ignored.
My standalone test program runs with the 2nd persistence.xml file as META-INF/persistence.xml file in a directory that is in the programs classpath.
Why is it not being processed during the creation of the PersistenceManagerFactory?
I am creating the PersistenceManagerFactory using following code:
Persistence.createEntityManagerFactory(persistenceUnitName, properties);
TIA for your help.
|
|