@Override
 public void start(StartContext context) throws StartException {
   try {
     JPA_LOGGER.startingService("Persistence Unit", pu.getScopedPersistenceUnitName());
     pu.setJtaDataSource(jtaDataSource.getOptionalValue());
     pu.setNonJtaDataSource(nonJtaDataSource.getOptionalValue());
     this.entityManagerFactory = createContainerEntityManagerFactory();
   } finally {
     pu.setTempClassLoaderFactory(
         null); // release the temp classloader factory (only needed when creating the EMF)
   }
 }
 @Override
 public void start(StartContext context) throws StartException {
   try {
     JPA_LOGGER.startingService("Persistence Unit", pu.getScopedPersistenceUnitName());
     pu.setTempClassLoaderFactory(new TempClassLoaderFactoryImpl(classLoader));
     pu.setJtaDataSource(jtaDataSource.getOptionalValue());
     pu.setNonJtaDataSource(nonJtaDataSource.getOptionalValue());
     WritableServiceBasedNamingStore.pushOwner(
         context.getController().getServiceContainer().subTarget());
     this.entityManagerFactory = createContainerEntityManagerFactory();
   } finally {
     pu.setTempClassLoaderFactory(
         null); // release the temp classloader factory (only needed when creating the EMF)
     WritableServiceBasedNamingStore.popOwner();
   }
 }