EntityManager em = emf.createEntityManager(refDesc.getSynchronizationType(), refDesc.getProperties());
physicalEntityManagerWrapper = new PhysicalEntityManagerWrapper(em, refDesc.getSynchronizationType());
} catch (Throwable th) {
EJBException ejbEx = new EJBException
if(physicalEntityManagerWrapper.getSynchronizationType() != refDesc.getSynchronizationType()) {
throw new EJBException("The current invocation inherits a persistence context of synchronization type '" + physicalEntityManagerWrapper.getSynchronizationType() +
"' where as it references a persistence context of synchronization type '" + refDesc.getSynchronizationType() +
"' refName: " + refDesc.getName() +
" unitName: " + unitName );
refInfo.refCount++;
} else {
refInfo = new EEMRefInfo(emRefName, refDesc.getUnitName(), refDesc.getSynchronizationType(), containerID,
sessionKey, physicalEntityManagerWrapper.getEM(), emf);
refInfo.refCount = 1;