for (ResourceRoot resourceRoot : DeploymentUtils.allResourceRoots(deploymentUnit)) {
PersistenceUnitMetadataHolder holder = resourceRoot.getAttachment(PersistenceUnitMetadataHolder.PERSISTENCE_UNITS);
if (holder != null) {
for (PersistenceUnitMetadata pu : holder.getPersistenceUnits()) {
if (Configuration.needClassFileTransformer(pu)) {
transformer.addTransformer(new JPADelegatingClassFileTransformer(pu));
}
}
}
}
}