org.hibernate.ejb.Ejb3Configuration Java Examples
The following examples show how to use
org.hibernate.ejb.Ejb3Configuration.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpringHibernateEjbPersistenceProvider.java From lams with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("rawtypes") public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties) { Ejb3Configuration cfg = new Ejb3Configuration(); if (info instanceof SmartPersistenceUnitInfo) { for (String managedPackage : ((SmartPersistenceUnitInfo) info).getManagedPackages()) { cfg.addPackage(managedPackage); } } Ejb3Configuration configured = cfg.configure(info, properties); return (configured != null ? configured.buildEntityManagerFactory() : null); }
Example #2
Source File: SpringHibernateEjbPersistenceProvider.java From spring4-understanding with Apache License 2.0 | 5 votes |
@SuppressWarnings("rawtypes") public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties) { Ejb3Configuration cfg = new Ejb3Configuration(); if (info instanceof SmartPersistenceUnitInfo) { for (String managedPackage : ((SmartPersistenceUnitInfo) info).getManagedPackages()) { cfg.addPackage(managedPackage); } } Ejb3Configuration configured = cfg.configure(info, properties); return (configured != null ? configured.buildEntityManagerFactory() : null); }