org.hibernate.ejb
Class HibernatePersistence

java.lang.Object
  extended by org.hibernate.ejb.HibernatePersistence
All Implemented Interfaces:
javax.persistence.spi.PersistenceProvider

public class HibernatePersistence
extends java.lang.Object
implements javax.persistence.spi.PersistenceProvider

Hibernate EJB3 persistence provider implementation

Author:
Gavin King

Field Summary
static java.lang.String AUTODETECTION
          JAR autodetection artifacts class, hbm
static java.lang.String CFG_FILE
          cfg.xml configuration file used
static java.lang.String CLASS_CACHE_PREFIX
          Caching configuration should follow the following pattern hibernate.ejb.classcache. usage[, region] where usage is the cache strategy used and region the cache region name
static java.lang.String CLASS_NAMES
          List of classes names Internal use only
static java.lang.String COLLECTION_CACHE_PREFIX
          Caching configuration should follow the following pattern hibernate.ejb.collectioncache.. usage[, region] where usage is the cache strategy used and region the cache region name
static java.lang.String CONFIGURATION_JNDI_NAME
          Consider this as experimental It is not recommended to set up this property, the configuration is stored in the JNDI in a serialized form
static java.lang.String DISCARD_PC_ON_CLOSE
          Whether or not discard persistent context on entityManager.close() The EJB3 compliant and default choice is false
static java.lang.String EVENT_LISTENER_PREFIX
          Event configuration should follow the following pattern hibernate.ejb.event.[eventType] f.q.c.n.EventListener1, f.q.c.n.EventListener12 ...
static java.lang.String HBXML_FILES
           
static java.lang.String INTERCEPTOR
          Interceptor class name, the class has to have a no-arg constructor the interceptor instance is shared amongst all EntityManager of a given EntityManagerFactory
static java.lang.String JACC_CONTEXT_ID
           
static java.lang.String JACC_ENABLED
           
static java.lang.String JACC_PREFIX
           
static java.lang.String JTA_DATASOURCE
          JTA datasource name
static java.lang.String LOADED_CLASSES
           
static java.lang.String NAMING_STRATEGY
          Naming strategy class name, the class has to have a no-arg constructor
static java.lang.String NON_JTA_DATASOURCE
          Non JTA datasource name
static java.lang.String PACKAGE_NAMES
          List of annotated packages Internal use only
static java.lang.String PERSISTENCE_UNIT_NAME
           
static java.lang.String PROVIDER
          Provider
static java.lang.String SESSION_INTERCEPTOR
          Interceptor class name, the class has to have a no-arg constructor
static java.lang.String TRANSACTION_TYPE
          ? transaction type
static java.lang.String USE_CLASS_ENHANCER
          Enable the class file enhancement
static java.lang.String XML_FILE_NAMES
          List of classes names Internal use only
 
Constructor Summary
HibernatePersistence()
           
 
Method Summary
 javax.persistence.EntityManagerFactory createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo info, java.util.Map map)
           
 javax.persistence.EntityManagerFactory createEntityManagerFactory(java.util.Map properties)
          Deprecated.  
 javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String persistenceUnitName, java.util.Map overridenProperties)
          Get an entity manager factory by its entity manager name and given the appropriate extra properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROVIDER

public static final java.lang.String PROVIDER
Provider

See Also:
Constant Field Values

TRANSACTION_TYPE

public static final java.lang.String TRANSACTION_TYPE
? transaction type

See Also:
Constant Field Values

JTA_DATASOURCE

public static final java.lang.String JTA_DATASOURCE
JTA datasource name

See Also:
Constant Field Values

NON_JTA_DATASOURCE

public static final java.lang.String NON_JTA_DATASOURCE
Non JTA datasource name

See Also:
Constant Field Values

AUTODETECTION

public static final java.lang.String AUTODETECTION
JAR autodetection artifacts class, hbm

See Also:
Constant Field Values

CFG_FILE

public static final java.lang.String CFG_FILE
cfg.xml configuration file used

See Also:
Constant Field Values

CLASS_CACHE_PREFIX

public static final java.lang.String CLASS_CACHE_PREFIX
Caching configuration should follow the following pattern hibernate.ejb.classcache. usage[, region] where usage is the cache strategy used and region the cache region name

See Also:
Constant Field Values

COLLECTION_CACHE_PREFIX

public static final java.lang.String COLLECTION_CACHE_PREFIX
Caching configuration should follow the following pattern hibernate.ejb.collectioncache.. usage[, region] where usage is the cache strategy used and region the cache region name

See Also:
Constant Field Values

INTERCEPTOR

public static final java.lang.String INTERCEPTOR
Interceptor class name, the class has to have a no-arg constructor the interceptor instance is shared amongst all EntityManager of a given EntityManagerFactory

See Also:
Constant Field Values

SESSION_INTERCEPTOR

public static final java.lang.String SESSION_INTERCEPTOR
Interceptor class name, the class has to have a no-arg constructor

See Also:
Constant Field Values

NAMING_STRATEGY

public static final java.lang.String NAMING_STRATEGY
Naming strategy class name, the class has to have a no-arg constructor

See Also:
Constant Field Values

EVENT_LISTENER_PREFIX

public static final java.lang.String EVENT_LISTENER_PREFIX
Event configuration should follow the following pattern hibernate.ejb.event.[eventType] f.q.c.n.EventListener1, f.q.c.n.EventListener12 ...

See Also:
Constant Field Values

USE_CLASS_ENHANCER

public static final java.lang.String USE_CLASS_ENHANCER
Enable the class file enhancement

See Also:
Constant Field Values

DISCARD_PC_ON_CLOSE

public static final java.lang.String DISCARD_PC_ON_CLOSE
Whether or not discard persistent context on entityManager.close() The EJB3 compliant and default choice is false

See Also:
Constant Field Values

CONFIGURATION_JNDI_NAME

public static final java.lang.String CONFIGURATION_JNDI_NAME
Consider this as experimental It is not recommended to set up this property, the configuration is stored in the JNDI in a serialized form

See Also:
Constant Field Values

CLASS_NAMES

public static final java.lang.String CLASS_NAMES
List of classes names Internal use only

See Also:
Constant Field Values

PACKAGE_NAMES

public static final java.lang.String PACKAGE_NAMES
List of annotated packages Internal use only

See Also:
Constant Field Values

XML_FILE_NAMES

public static final java.lang.String XML_FILE_NAMES
List of classes names Internal use only

See Also:
Constant Field Values

HBXML_FILES

public static final java.lang.String HBXML_FILES
See Also:
Constant Field Values

LOADED_CLASSES

public static final java.lang.String LOADED_CLASSES
See Also:
Constant Field Values

JACC_CONTEXT_ID

public static final java.lang.String JACC_CONTEXT_ID
See Also:
Constant Field Values

JACC_PREFIX

public static final java.lang.String JACC_PREFIX
See Also:
Constant Field Values

JACC_ENABLED

public static final java.lang.String JACC_ENABLED
See Also:
Constant Field Values

PERSISTENCE_UNIT_NAME

public static final java.lang.String PERSISTENCE_UNIT_NAME
See Also:
Constant Field Values
Constructor Detail

HibernatePersistence

public HibernatePersistence()
Method Detail

createEntityManagerFactory

public javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String persistenceUnitName,
                                                                         java.util.Map overridenProperties)
Get an entity manager factory by its entity manager name and given the appropriate extra properties. Those proeprties override the one get through the peristence.xml file.

Specified by:
createEntityManagerFactory in interface javax.persistence.spi.PersistenceProvider
Parameters:
persistenceUnitName - entity manager name
overridenProperties - properties passed to the persistence provider
Returns:
initialized EntityManagerFactory

createContainerEntityManagerFactory

public javax.persistence.EntityManagerFactory createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo info,
                                                                                  java.util.Map map)
Specified by:
createContainerEntityManagerFactory in interface javax.persistence.spi.PersistenceProvider

createEntityManagerFactory

public javax.persistence.EntityManagerFactory createEntityManagerFactory(java.util.Map properties)
Deprecated. 

create a factory from a canonical version