1 Reply Latest reply on Oct 10, 2007 7:54 AM by axismundi

    Can persistence.xml be deployed outside the jar?

    yangju

      Our datasources are sometimes deployed at runtime. If we deploy the persistence.xml inside the jar, then if we add a new datasource, we would have to open the jar and modify the xml file. This creates a headache for production people. I wonder if we can deploy the persistence.xml outside the jar, or in conf folder or directly under the deployment folder. We are using jbossAS 4.2.GA.

      Thanks.

      Richard

        • 1. Re: Can persistence.xml be deployed outside the jar?
          axismundi

          The location of persistence.xml is specified by the JPA standard, so - AFAIK - it is impossible to specify another location.

          However, you are always free to deploy your archives in exploded form. Then you can easily edit the persistence.xml and redeploy the corresponding jar.