1 Reply Latest reply on Aug 14, 2006 6:19 AM by Raja

    Persistance.xml in  .ear/META-INF

    Michael Steiner Newbie

      I have put my persistance.xml to META-INF in ear but jboss seems to ignore it. It is a bug?

      This is why I need this:
      I have 2 jars (A.jar and B.jar) with classes annotated with @Entity and 2 ears. In both ears I want to put jars A and B but in one ear entities from A.jar should be ignored, and in second ear entities from B.jar should be ignored. How to achieve this?
      (I dont wont ot build jars two times one with persistance.xml and one without)

        • 1. Re: Persistance.xml in  .ear/META-INF
          Raja Master

          The persistence.xml needs to be in META-INF of a *jar* file that is included in the EAR archive. You cant put the file directly in META-INF of the ear.
          To achieve what you need, you could tokenize the persistence.xml and feed the token values when you build the persistence.xml that will be a part of a jar that goes into the ear. Just a thought.