public Object create(Context ctx) { EntityManagerWrapper emWrapper = new EntityManagerWrapper(txManager, invMgr, compEnvMgr, callFlowAgent); emWrapper.initializeEMWrapper(refDesc.getUnitName(), refDesc.getPersistenceContextType(), refDesc.getProperties()); return emWrapper; } }
public Object create(Context ctx) { EntityManagerWrapper emWrapper = new EntityManagerWrapper(txManager, invMgr, compEnvMgr, callFlowAgent); emWrapper.initializeEMWrapper(refDesc.getUnitName(), refDesc.getPersistenceContextType(), refDesc.getSynchronizationType(), refDesc.getProperties()); return emWrapper; } }
private void processNewEmRefAnnotation (EntityManagerReferenceDescriptor emRef, String logicalName, PersistenceContext annotation) { emRef.setName(logicalName); if( !(annotation.unitName().equals("")) ) { emRef.setUnitName(annotation.unitName()); } emRef.setPersistenceContextType(annotation.type()); // Add each property from annotation to descriptor, unless // it has been overridden within the .xml. Map existingProperties = emRef.getProperties(); for(PersistenceProperty next : annotation.properties()) { if( !existingProperties.containsKey(next.name()) ) { emRef.addProperty(next.name(), next.value()); } } }
Map properties = refDesc.getProperties(); em = emf.createEntityManager(properties); if (em == null) {
private void processNewEmRefAnnotation (EntityManagerReferenceDescriptor emRef, String logicalName, PersistenceContext annotation) { emRef.setName(logicalName); if( !(annotation.unitName().equals("")) ) { emRef.setUnitName(annotation.unitName()); } emRef.setPersistenceContextType(annotation.type()); emRef.setSynchronizationType(annotation.synchronization()); // Add each property from annotation to descriptor, unless // it has been overridden within the .xml. Map existingProperties = emRef.getProperties(); for(PersistenceProperty next : annotation.properties()) { if( !existingProperties.containsKey(next.name()) ) { emRef.addProperty(next.name(), next.value()); } } }
descriptor.getProperties().entrySet()) { Node propertyNode = appendChild(entityMgrRefNode, TagNames.PERSISTENCE_PROPERTY);
descriptor.getProperties().entrySet()) { Node propertyNode = appendChild(entityMgrRefNode, TagNames.PERSISTENCE_PROPERTY);
EntityManager em = emf.createEntityManager(refDesc.getSynchronizationType(), refDesc.getProperties()); physicalEntityManagerWrapper = new PhysicalEntityManagerWrapper(em, refDesc.getSynchronizationType()); } catch (Throwable th) {