Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.ejb
Class HibernatePersistence

    java.lang.Object
      org.hibernate.ejb.HibernatePersistence

All Implemented Interfaces:
  javax.persistence.spi.PersistenceProvider

    public class HibernatePersistence

extends Object
implements javax.persistence.spi.PersistenceProvider

Hibernate EJB3 persistence provider implementation

Author:
  Gavin King

Field Summary
`static String` | `AUTODETECTION` JAR autodetection artifacts class, hbm
`static String` | `CFG_FILE` cfg.xml configuration file used
`static String` | `CLASS_CACHE_PREFIX` Caching configuration should follow the following pattern hibernate.ejb.classcache.
`static String` | `CLASS_NAMES` List of classes names Internal use only
`static String` | `COLLECTION_CACHE_PREFIX` Caching configuration should follow the following pattern hibernate.ejb.collectioncache.
`static String` | `DISCARD_PC_ON_CLOSE` Whether or not discard persistent context on entityManager.close() The EJB3 compliant and default choice is false
`static String` | `EVENT_LISTENER_PREFIX` Event configuration should follow the following pattern hibernate.ejb.event.
`static String` | `HBXML_FILES` link to the alternative Hibernate configuration file Internal use only
`static String` | `INTERCEPTOR` Interceptor class name, the class has to have a no-arg constructor
`static String` | `JACC_CONTEXT_ID`
`static String` | `JACC_ENABLED`
`static String` | `JACC_PREFIX`
`static String` | `JTA_DATASOURCE` JTA datasource name
`static String` | `LOADED_CLASSES`
`static String` | `NAMING_STRATEGY` Naming strategy class name, the class has to have a no-arg constructor
`static String` | `NON_JTA_DATASOURCE` Non JTA datasource name
`static String` | `PACKAGE_NAMES` List of annotated packages Internal use only
`static String` | `PERSISTENCE_UNIT_NAME`
`static String` | `PROVIDER` Provider
`static String` | `TRANSACTION_TYPE` ² transaction type
`static String` | `USE_CLASS_ENHANCER` Enable the class file enhancement
`static 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, Map map)`
`javax.persistence.EntityManagerFactory` | `createEntityManagerFactory(Map properties)` create a factory from a canonical version
`javax.persistence.EntityManagerFactory` | `createEntityManagerFactory(String persistenceUnitName, 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 String PROVIDER

  Provider

  See Also:
    Constant Field Values

### TRANSACTION_TYPE

    public static final String TRANSACTION_TYPE

  ² transaction type

  See Also:
    Constant Field Values

### JTA_DATASOURCE

    public static final String JTA_DATASOURCE

  JTA datasource name

  See Also:
    Constant Field Values

### NON_JTA_DATASOURCE

    public static final String NON_JTA_DATASOURCE

  Non JTA datasource name

  See Also:
    Constant Field Values

### AUTODETECTION

    public static final String AUTODETECTION

  JAR autodetection artifacts class, hbm

  See Also:
    Constant Field Values

### CLASS_NAMES

    public static final String CLASS_NAMES

  List of classes names Internal use only

  See Also:
    Constant Field Values

### PACKAGE_NAMES

    public static final String PACKAGE_NAMES

  List of annotated packages Internal use only

  See Also:
    Constant Field Values

### XML_FILE_NAMES

    public static final String XML_FILE_NAMES

  List of classes names Internal use only

  See Also:
    Constant Field Values

### CFG_FILE

    public static final String CFG_FILE

  cfg.xml configuration file used

  See Also:
    Constant Field Values

### CLASS_CACHE_PREFIX

    public static final 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 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 String INTERCEPTOR

  Interceptor class name, the class has to have a no-arg constructor

  See Also:
    Constant Field Values

### NAMING_STRATEGY

    public static final 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 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 String USE_CLASS_ENHANCER

  Enable the class file enhancement

  See Also:
    Constant Field Values

### DISCARD_PC_ON_CLOSE

    public static final 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

### HBXML_FILES

    public static final String HBXML_FILES

  link to the alternative Hibernate configuration file Internal use only

  See Also:
    Constant Field Values

### LOADED_CLASSES

    public static final String LOADED_CLASSES

See Also:
  Constant Field Values

### JACC_CONTEXT_ID

    public static final String JACC_CONTEXT_ID

See Also:
  Constant Field Values

### JACC_PREFIX

    public static final String JACC_PREFIX

See Also:
  Constant Field Values

### JACC_ENABLED

    public static final String JACC_ENABLED

See Also:
  Constant Field Values

### PERSISTENCE_UNIT_NAME

    public static final String PERSISTENCE_UNIT_NAME

See Also:
  Constant Field Values

Constructor Detail

### HibernatePersistence

    public HibernatePersistence()

Method Detail

### createEntityManagerFactory

    public javax.persistence.EntityManagerFactory createEntityManagerFactory(String persistenceUnitName,
                                                                             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,
                                                                                      Map map)

  Specified by:
    `createContainerEntityManagerFactory` in interface `javax.persistence.spi.PersistenceProvider`

### createEntityManagerFactory

    public javax.persistence.EntityManagerFactory createEntityManagerFactory(Map properties)

  create a factory from a canonical version

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD