org.hibernate.osgi
Class OsgiPersistenceProvider

java.lang.Object
  extended by org.hibernate.ejb.AvailableSettings
      extended by org.hibernate.ejb.HibernatePersistence
          extended by org.hibernate.osgi.OsgiPersistenceProvider
All Implemented Interfaces:
PersistenceProvider

public class OsgiPersistenceProvider
extends HibernatePersistence


Field Summary
 
Fields inherited from class org.hibernate.ejb.AvailableSettings
ALIAS_SPECIFIC_LOCK_MODE, AUTODETECTION, CFG_FILE, CLASS_CACHE_PREFIX, CLASS_NAMES, COLLECTION_CACHE_PREFIX, CONFIGURATION_JNDI_NAME, DISCARD_PC_ON_CLOSE, ENTITY_MANAGER_FACTORY_NAME, EVENT_LISTENER_PREFIX, FLUSH_MODE, HBXML_FILES, IDENTIFIER_GENERATOR_STRATEGY_PROVIDER, INTERCEPTOR, JACC_CONTEXT_ID, JACC_ENABLED, JACC_PREFIX, JDBC_DRIVER, JDBC_PASSWORD, JDBC_URL, JDBC_USER, JPA_METAMODEL_GENERATION, JPA_METAMODEL_POPULATION, JTA_DATASOURCE, LOADED_CLASSES, LOCK_SCOPE, LOCK_TIMEOUT, NAMING_STRATEGY, NAMING_STRATEGY_DELEGATOR, NON_JTA_DATASOURCE, PACKAGE_NAMES, PERSIST_VALIDATION_GROUP, PERSISTENCE_UNIT_NAME, PROVIDER, REMOVE_VALIDATION_GROUP, SCANNER, SESSION_FACTORY_OBSERVER, SESSION_INTERCEPTOR, SHARED_CACHE_MODE, SHARED_CACHE_RETRIEVE_MODE, SHARED_CACHE_STORE_MODE, TRANSACTION_TYPE, UPDATE_VALIDATION_GROUP, USE_CLASS_ENHANCER, VALIDATION_FACTORY, VALIDATION_MODE, XML_FILE_NAMES
 
Constructor Summary
OsgiPersistenceProvider(OsgiClassLoader osgiClassLoader, OsgiJtaPlatform osgiJtaPlatform, org.osgi.framework.Bundle requestingBundle, org.osgi.framework.BundleContext context)
           
 
Method Summary
 EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties)
          Create an entity manager factory from the given persistence unit info, using the specified properties (they override any on the PUI).
 EntityManagerFactory createEntityManagerFactory(String persistenceUnitName, Map properties)
          Get an entity manager factory by its entity manager name, using the specified properties (they override any found in the peristence.xml file).
 
Methods inherited from class org.hibernate.ejb.HibernatePersistence
createEntityManagerFactory, getProviderUtil
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiPersistenceProvider

public OsgiPersistenceProvider(OsgiClassLoader osgiClassLoader,
                               OsgiJtaPlatform osgiJtaPlatform,
                               org.osgi.framework.Bundle requestingBundle,
                               org.osgi.framework.BundleContext context)
Method Detail

createEntityManagerFactory

public EntityManagerFactory createEntityManagerFactory(String persistenceUnitName,
                                                       Map properties)
Description copied from class: HibernatePersistence
Get an entity manager factory by its entity manager name, using the specified properties (they override any found in the peristence.xml file).

This is the form used in JSE environments.

Specified by:
createEntityManagerFactory in interface PersistenceProvider
Overrides:
createEntityManagerFactory in class HibernatePersistence
Parameters:
persistenceUnitName - entity manager name
properties - The explicit property values
Returns:
initialized EntityManagerFactory

createContainerEntityManagerFactory

public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info,
                                                                Map properties)
Description copied from class: HibernatePersistence
Create an entity manager factory from the given persistence unit info, using the specified properties (they override any on the PUI).

This is the form used by the container in a JEE environment.

Specified by:
createContainerEntityManagerFactory in interface PersistenceProvider
Overrides:
createContainerEntityManagerFactory in class HibernatePersistence
Parameters:
info - The persistence unit information
properties - The explicit property values
Returns:
initialized EntityManagerFactory


Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.