Jan 8th, 2009, 09:14 PM
persistence.xml and <jar-file>
I have entities in two separate jars that are loaded by my webapp. The only way I have found to make this work is to have a persistence.xml in my webapp that loads the entities using the jar-file tag. The problem is that the only way I can make it work is to use absolute file URLs to the jars, which is not workable for production. Can someone please tell me the right incantation for a relative URL? I've tried everything I can think of.
Also, is there a more elegant way than using jar-file?
(I'm posting here because I'm using a Spring 2.5 / EJB3 infrastructure, i.e. the annotations Repository, Service, PersistenceContext, Resource.)
Any help is appreciated.
May 5th, 2009, 09:50 AM
I am finding the same problem right now... after extracting out my jpa domain into a seperate jar which will be used in multiple projects. Anyone have any ideas on this?
May 5th, 2009, 11:22 AM
We ended up solving the problem by implementing PersistenceUnitPostProcessor. See my post at:
Tags for this Thread