Announcement Announcement Module
No announcement yet.
persistence.xml and <jar-file> Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    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
      We ended up solving the problem by implementing PersistenceUnitPostProcessor. See my post at: