In general you should just make sure that the correct configuration is the one that has precendence. For example, for the jBPM console we just copy a new persistence.xml in the server war under the classes folder, which overrides any configuration that might be available in jars.
Kris