Interface PersistenceSettings
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Specifies a class implementingPersistenceProvider
.static final String
Specifies the type of transactions supported by the entity managers.static final String
Allows JPA callbacks (viaPreUpdate
and friends) to be completely disabled.static final String
Deprecated.static final String
Deprecated.UseJAKARTA_TRANSACTION_TYPE
insteadstatic final String
Specifies the name of the persistence unit.static final String
static final String
Specifies anArchiveDescriptorFactory
to use in the scanning process, either: an instance ofArchiveDescriptorFactory
, aClass
representing a class that implementsArchiveDescriptorFactory
, or the name of a class that implementsArchiveDescriptorFactory
.static final String
Identifies a comma-separated list of values indicating the types of things we should auto-detect during scanning.static final String
An optional name used to bind the SessionFactory into JNDI.static final String
Setting used to name the HibernateSessionFactory
.static final String
Does the value defined bySESSION_FACTORY_NAME
represent a JNDI namespace into which theSessionFactory
should be bound and made accessible?static final String
Specifies a class which implementsSessionFactoryObserver
and has a constructor with no parameters.static final String
Specifies 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
- 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_JNDI
is set totrue
, this name will also be used asSESSION_FACTORY_JNDI_NAME
. -
SESSION_FACTORY_JNDI_NAME
An optional name used to bind the SessionFactory into JNDI.If
SESSION_FACTORY_NAME_IS_JNDI
is set totrue
,SESSION_FACTORY_NAME
will be used as the JNDI name -
SESSION_FACTORY_NAME_IS_JNDI
Does the value defined bySESSION_FACTORY_NAME
represent a JNDI namespace into which theSessionFactory
should be bound and made accessible?Defaults to
true
for backwards compatibility.Set this to
false
if 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:
true
ifEntityManagerFactory.getName()
comes from "hibernate.session_factory_name";false
if there is noEntityManagerFactory.getName()
or if it comes from "hibernate.persistenceUnitName"
-
PERSISTENCE_UNIT_NAME
Specifies the name of the persistence unit. -
SCANNER
-
SCANNER_ARCHIVE_INTERPRETER
Specifies anArchiveDescriptorFactory
to use in the scanning process, either:- an instance of
ArchiveDescriptorFactory
, - a
Class
representing a class that implementsArchiveDescriptorFactory
, or - the name of a class that implements
ArchiveDescriptorFactory
.
See information on
Scanner
about expected constructor forms. - an instance of
-
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.class
files are discovered as managed classes"hbm"
specifies thathbm.xml
files are discovered as mapping files
-
JPA_CALLBACKS_ENABLED
Allows JPA callbacks (viaPreUpdate
and 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
false
to 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 implementsSessionFactoryObserver
and has a constructor with no parameters. -
JPA_PERSISTENCE_PROVIDER
Deprecated.UseJAKARTA_PERSISTENCE_PROVIDER
instead- See Also:
-
JPA_TRANSACTION_TYPE
Deprecated.UseJAKARTA_TRANSACTION_TYPE
insteadThe 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_PROVIDER
instead