Interface PersistenceSettings
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSpecifies a class implementingPersistenceProvider.static final StringSpecifies the type of transactions supported by the entity managers.static final StringAllows JPA callbacks (viaPreUpdateand friends) to be completely disabled.static final StringDeprecated.static final StringDeprecated.UseJAKARTA_TRANSACTION_TYPEinsteadstatic final StringSpecifies the name of the persistence unit.static final Stringstatic final StringSpecifies anArchiveDescriptorFactoryto use in the scanning process, either: an instance ofArchiveDescriptorFactory, aClassrepresenting a class that implementsArchiveDescriptorFactory, or the name of a class that implementsArchiveDescriptorFactory.static final StringIdentifies a comma-separated list of values indicating the types of things we should autodetect during scanning.static final StringAn optional name used to bind the SessionFactory into JNDI.static final StringSetting used to name the HibernateSessionFactory.static final StringDoes the value defined bySESSION_FACTORY_NAMErepresent a JNDI namespace into which theSessionFactoryshould be bound and made accessible?static final StringSpecifies a class which implementsSessionFactoryObserverand has a constructor with no parameters.static final StringSpecifies whether unowned (i.e.
-
Field Details
-
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:
-
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
- See Also:
- For Java SE, the default is
-
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 name will also be used asSESSION_FACTORY_JNDI_NAME.- See Also:
-
SESSION_FACTORY_JNDI_NAME
An optional name used to bind the SessionFactory into JNDI.If
SESSION_FACTORY_NAME_IS_JNDIis set totrue,SESSION_FACTORY_NAMEwill be used as the JNDI name- Since:
- 7.0
- See Also:
-
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.- See Also:
- Default Value:
trueifSessionFactory.getName()comes from "hibernate.session_factory_name";falseif there is noSessionFactory.getName()or if it comes from "hibernate.persistenceUnitName"
-
PERSISTENCE_UNIT_NAME
Specifies the name of the persistence unit.- See Also:
-
SCANNER
Specifies an implementation ofScanner, either:- an instance of
Scanner, - a
Classrepresenting a class that implementsScanner - the name of a class that implements
Scanner.
- See Also:
- an instance of
-
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.- See Also:
- an instance of
-
SCANNER_DISCOVERY
Identifies a comma-separated list of values indicating the types of things we should autodetect during scanning. Allowable values include:"class"specifies that.classfiles are discovered as managed classes"hbm"specifies thathbm.xmlfiles are discovered as mapping files
.classdiscovery is enabled, the modulehibernate-scan-jandexmust be added as a dependency, or some other implementation of the serviceScannerFactorymust be made available.- See Also:
-
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:
-
SESSION_FACTORY_OBSERVER
Specifies a class which implementsSessionFactoryObserverand has a constructor with no parameters.- See Also:
-
JPA_PERSISTENCE_PROVIDER
Deprecated.UseJAKARTA_PERSISTENCE_PROVIDERinstead- See Also:
-
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:
-
UNOWNED_ASSOCIATION_TRANSIENT_CHECK
Specifies whether unowned (i.e.mapped-by) associations should be considered when validating transient entity instance references.- See Also:
- Default Value:
false
-
JAKARTA_PERSISTENCE_PROVIDERinstead