//find path relative to module base uri
relative = module.getRelativePath(relative);
PersistenceDocument persistenceDocument;
try {
XmlObject xmlObject = XmlBeansUtil.parse(persistenceUrl, moduleContext.getClassLoader());
persistenceDocument = (PersistenceDocument) xmlObject.changeType(PersistenceDocument.type);
} catch (XmlException e) {
throw new DeploymentException("Could not parse persistence.xml file: " + persistenceUrl, e);
}
PersistenceDocument.Persistence persistence = persistenceDocument.getPersistence();
buildPersistenceUnits(persistence, overrides, module, relative);