if (unitInfo.webappName != null && unitInfo.webappName.equals(webAppInfo.moduleId)) {
try {
final ReloadableEntityManagerFactory remf =
(ReloadableEntityManagerFactory) SystemInstance.get().getComponent(ContainerSystem.class)
.getJNDIContext().lookup(Assembler.PERSISTENCE_UNIT_NAMING_CONTEXT + unitInfo.id);
remf.overrideClassLoader(classLoader);
remf.createDelegate();
} catch (final NameNotFoundException nnfe) {
logger.warning("Can't find " + unitInfo.id + " persistence unit");
}
}