Results 1 to 3 of 3

Thread: persistence.xml and <jar-file>

  1. #1
    Join Date
    Jan 2009
    Posts
    4

    Default 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.
    Thanks,
    Julian

  2. #2

    Default

    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?

  3. #3
    Join Date
    Jan 2009
    Posts
    4

    Default

    We ended up solving the problem by implementing PersistenceUnitPostProcessor. See my post at:

    http://javathoughts.capesugarbird.co...nce-units.html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •