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