Author: epbernard
Date: 2006-11-07 12:04:27 -0500 (Tue, 07 Nov 2006)
New Revision: 10753
Modified:
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/HibernatePersistence.java
Log:
EJB-247 return null when not a HEM
Modified:
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/HibernatePersistence.java
===================================================================
---
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/HibernatePersistence.java 2006-11-07
14:48:59 UTC (rev 10752)
+++
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/HibernatePersistence.java 2006-11-07
17:04:27 UTC (rev 10753)
@@ -117,14 +117,14 @@
*/
public EntityManagerFactory createEntityManagerFactory(String persistenceUnitName, Map
overridenProperties) {
Ejb3Configuration cfg = new Ejb3Configuration();
- cfg.configure( persistenceUnitName, overridenProperties );
- return cfg.buildEntityManagerFactory();
+ Ejb3Configuration configured = cfg.configure( persistenceUnitName, overridenProperties
);
+ return configured != null ? configured.buildEntityManagerFactory() : null;
}
public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo
info, Map map) {
Ejb3Configuration cfg = new Ejb3Configuration();
- cfg.configure( info, map );
- return cfg.buildEntityManagerFactory();
+ Ejb3Configuration configured = cfg.configure( info, map );
+ return configured != null ? configured.buildEntityManagerFactory() : null;
}
/**
Show replies by date