Package org.hibernate
Enum Class ConnectionAcquisitionMode
- All Implemented Interfaces:
Serializable
,Comparable<ConnectionAcquisitionMode>
,java.lang.constant.Constable
Indicates the manner in which JDBC connections
are acquired. Complementary to
ConnectionReleaseMode
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAConnection
is acquired only when (and if) it's actually needed.TheConnection
will be acquired as soon as a session is opened. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionAcquisitionMode
static ConnectionAcquisitionMode
static ConnectionAcquisitionMode
Returns the enum constant of this class with the specified name.static ConnectionAcquisitionMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IMMEDIATELY
TheConnection
will be acquired as soon as a session is opened.This circumvents the
ConnectionReleaseMode
, as theConnection
will then be held until the session is closed. -
AS_NEEDED
AConnection
is acquired only when (and if) it's actually needed.This is the default (and legacy) behavior.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
interpret
-
interpret
-