Interface PersistenceSettings
-
public interface PersistenceSettingsSettings related to persistence-units
-
-
Field Summary
Fields Modifier and Type Field Description static StringJAKARTA_PERSISTENCE_PROVIDERSpecifies a class implementingPersistenceProvider.static StringJAKARTA_TRANSACTION_TYPESpecifies the type of transactions supported by the entity managers.static StringJPA_CALLBACKS_ENABLEDAllows JPA callbacks (viaPreUpdateand friends) to be completely disabled.static StringJPA_PERSISTENCE_PROVIDERDeprecated.UseJAKARTA_PERSISTENCE_PROVIDERinsteadstatic StringJPA_TRANSACTION_TYPEDeprecated.UseJAKARTA_TRANSACTION_TYPEinsteadstatic StringPERSISTENCE_UNIT_NAMESpecifies the name of the persistence unit.static StringSCANNERstatic StringSCANNER_ARCHIVE_INTERPRETERSpecifies anArchiveDescriptorFactoryto use in the scanning process, either: an instance ofArchiveDescriptorFactory, aClassrepresenting a class that implementsArchiveDescriptorFactory, or the name of a class that implementsArchiveDescriptorFactory.static StringSCANNER_DISCOVERYIdentifies a comma-separated list of values indicating the types of things we should auto-detect during scanning.static StringSESSION_FACTORY_NAMESetting used to name the HibernateSessionFactory.static StringSESSION_FACTORY_NAME_IS_JNDIDoes the value defined bySESSION_FACTORY_NAMErepresent a JNDI namespace into which theSessionFactoryshould be bound and made accessible?static StringSESSION_FACTORY_OBSERVERSpecifies a class which implementsSessionFactoryObserverand has a constructor with no parameters.
-
-
-
Field Detail
-
JAKARTA_PERSISTENCE_PROVIDER
static final String JAKARTA_PERSISTENCE_PROVIDER
Specifies a class implementingPersistenceProvider. Naturally, this should always beHibernatePersistenceProvider, which is the best damn persistence provider ever. There's no need to explicitly specify this setting when there are no inferior persistence providers floating about.See JPA 2 sections 9.4.3 and 8.2.1.4
- See Also:
- Constant Field Values
-
JAKARTA_TRANSACTION_TYPE
static final String JAKARTA_TRANSACTION_TYPE
Specifies the type of transactions supported by the entity managers. The default depends on whether the program is considered to be executing in a Java SE or EE environment:- For Java SE, the default is
RESOURCE_LOCAL. - For Java EE, the default is
JTA.
See JPA 2 sections 9.4.3 and 8.2.1.2
- For Java SE, the default is
-
SESSION_FACTORY_NAME
static final String SESSION_FACTORY_NAME
Setting used to name the HibernateSessionFactory.Naming the SessionFactory allows for it to be properly serialized across JVMs as long as the same name is used on each JVM.
If
SESSION_FACTORY_NAME_IS_JNDIis set totrue, this is also the name under which the SessionFactory is bound into JNDI on startup and from which it can be obtained from JNDI.- See Also:
SESSION_FACTORY_NAME_IS_JNDI,SessionFactoryRegistry,SessionFactoryBuilder.applyName(String), Constant Field Values
-
SESSION_FACTORY_NAME_IS_JNDI
static final String SESSION_FACTORY_NAME_IS_JNDI
Does the value defined bySESSION_FACTORY_NAMErepresent a JNDI namespace into which theSessionFactoryshould be bound and made accessible?Defaults to
truefor backwards compatibility.Set this to
falseif naming a SessionFactory is needed for serialization purposes, but no writable JNDI context exists in the runtime environment or if the user simply does not want JNDI to be used.
-
PERSISTENCE_UNIT_NAME
static final String PERSISTENCE_UNIT_NAME
Specifies the name of the persistence unit.
-
SCANNER
static final String SCANNER
-
SCANNER_ARCHIVE_INTERPRETER
static final String SCANNER_ARCHIVE_INTERPRETER
Specifies anArchiveDescriptorFactoryto use in the scanning process, either:- an instance of
ArchiveDescriptorFactory, - a
Classrepresenting a class that implementsArchiveDescriptorFactory, or - the name of a class that implements
ArchiveDescriptorFactory.
See information on
Scannerabout expected constructor forms. - an instance of
-
SCANNER_DISCOVERY
static final String SCANNER_DISCOVERY
Identifies a comma-separated list of values indicating the types of things we should auto-detect during scanning. Allowable values include:"class"specifies that.classfiles are discovered as managed classes"hbm"specifies thathbm.xmlfiles are discovered as mapping files
-
JPA_CALLBACKS_ENABLED
@Incubating static final String JPA_CALLBACKS_ENABLED
Allows JPA callbacks (viaPreUpdateand friends) to be completely disabled. Mostly useful to save some memory when they are not used.JPA callbacks are enabled by default. Set this property to
falseto disable them.Experimental and will likely be removed as soon as the memory overhead is resolved.
- Since:
- 5.4
- See Also:
CallbackType, Constant Field Values
-
SESSION_FACTORY_OBSERVER
static final String SESSION_FACTORY_OBSERVER
Specifies a class which implementsSessionFactoryObserverand has a constructor with no parameters.
-
JPA_PERSISTENCE_PROVIDER
@Deprecated static final String JPA_PERSISTENCE_PROVIDER
Deprecated.UseJAKARTA_PERSISTENCE_PROVIDERinstead- See Also:
- Constant Field Values
-
JPA_TRANSACTION_TYPE
@Deprecated static final String JPA_TRANSACTION_TYPE
Deprecated.UseJAKARTA_TRANSACTION_TYPEinsteadThe type of transactions supported by the entity managers.See JPA 2 sections 9.4.3 and 8.2.1.2
- See Also:
- Constant Field Values
-
-