Interface PersistenceSettings
-
- All Known Subinterfaces:
AvailableSettings
- All Known Implementing Classes:
Environment
public interface PersistenceSettings
Settings related to persistence-units
-
-
Field Summary
Fields Modifier and Type Field Description static String
JAKARTA_PERSISTENCE_PROVIDER
Specifies a class implementingPersistenceProvider
.static String
JAKARTA_TRANSACTION_TYPE
Specifies the type of transactions supported by the entity managers.static String
JPA_CALLBACKS_ENABLED
Allows JPA callbacks (viaPreUpdate
and friends) to be completely disabled.static String
JPA_PERSISTENCE_PROVIDER
Deprecated.UseJAKARTA_PERSISTENCE_PROVIDER
insteadstatic String
JPA_TRANSACTION_TYPE
Deprecated.UseJAKARTA_TRANSACTION_TYPE
insteadstatic String
PERSISTENCE_UNIT_NAME
Specifies the name of the persistence unit.static String
SCANNER
static String
SCANNER_ARCHIVE_INTERPRETER
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 String
SCANNER_DISCOVERY
Identifies a comma-separated list of values indicating the types of things we should auto-detect during scanning.static String
SESSION_FACTORY_NAME
Setting used to name the HibernateSessionFactory
.static String
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?static String
SESSION_FACTORY_OBSERVER
Specifies a class which implementsSessionFactoryObserver
and 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_JNDI
is 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_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.
-
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 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
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.class
files are discovered as managed classes"hbm"
specifies thathbm.xml
files are discovered as mapping files
-
JPA_CALLBACKS_ENABLED
@Incubating static final String 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:
CallbackType
, Constant Field Values
-
SESSION_FACTORY_OBSERVER
static final String SESSION_FACTORY_OBSERVER
Specifies a class which implementsSessionFactoryObserver
and has a constructor with no parameters.
-
JPA_PERSISTENCE_PROVIDER
@Deprecated static final String JPA_PERSISTENCE_PROVIDER
Deprecated.UseJAKARTA_PERSISTENCE_PROVIDER
instead- See Also:
- Constant Field Values
-
JPA_TRANSACTION_TYPE
@Deprecated static final String 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:
- Constant Field Values
-
-