Interface PersistenceSettings
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
public interfacePersistenceSettingsSettings related to persistence-units
Field Summary
Fields Modifier and Type Field Description staticStringJAKARTA_PERSISTENCE_PROVIDERSpecifies a class implementingPersistenceProvider.staticStringJAKARTA_TRANSACTION_TYPESpecifies thetype of transactions supported by the entity managers.staticStringJPA_CALLBACKS_ENABLEDAllows JPA callbacks (viaPreUpdateand friends) to be completely disabled.staticStringJPA_PERSISTENCE_PROVIDERDeprecated.UseJAKARTA_PERSISTENCE_PROVIDERinsteadstaticStringJPA_TRANSACTION_TYPEDeprecated.UseJAKARTA_TRANSACTION_TYPEinsteadstaticStringPERSISTENCE_UNIT_NAMESpecifies the name of the persistence unit.staticStringSCANNERstaticStringSCANNER_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.staticStringSCANNER_DISCOVERYIdentifies a comma-separated list of values indicating the types of things we should auto-detect during scanning.staticStringSESSION_FACTORY_NAMESetting used to name the HibernateSessionFactory.staticStringSESSION_FACTORY_NAME_IS_JNDIDoes the value defined bySESSION_FACTORY_NAMErepresent a JNDI namespace into which theSessionFactoryshould be bound and made accessible?staticStringSESSION_FACTORY_OBSERVERSpecifies a class which implementsSessionFactoryObserverand has a constructor with no parameters.staticStringUNOWNED_ASSOCIATION_TRANSIENT_CHECKSpecifies whether unowned (i.e.
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 thetype 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.
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
@Incubatingstatic 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
@Deprecatedstatic final String JPA_PERSISTENCE_PROVIDER
Deprecated.UseJAKARTA_PERSISTENCE_PROVIDERinstead- See Also:
- Constant Field Values
JPA_TRANSACTION_TYPE
@Deprecatedstatic 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
UNOWNED_ASSOCIATION_TRANSIENT_CHECK
static final String UNOWNED_ASSOCIATION_TRANSIENT_CHECK
Specifies whether unowned (i.e.mapped-by) associations should be considered when validating transient entity instance references.- See Also:
- Constant Field Values
- Default Value:
false