Package org.hibernate.resource.jdbc.spi
Enum Class PhysicalConnectionHandlingMode
java.lang.Object
java.lang.Enum<PhysicalConnectionHandlingMode>
org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode
- All Implemented Interfaces:
Serializable
,Comparable<PhysicalConnectionHandlingMode>
,java.lang.constant.Constable
Enumerates valid combinations of
ConnectionAcquisitionMode
and
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 ConstantDescriptionTheConnection
will be acquired as soon as it is needed and then held until the session is closed.TheConnection
will be acquired as soon as it is needed; it will be released after each statement is executed.TheConnection
will be acquired as soon as it is needed; it will be released after each transaction is completed.TheConnection
will be acquired as soon as it is needed; it will be released before commit or rollback.TheConnection
will be acquired as soon as the session is opened and held until the session is closed. -
Method Summary
Modifier and TypeMethodDescriptioninterpret
(ConnectionAcquisitionMode acquisitionMode, ConnectionReleaseMode releaseMode) Returns the enum constant of this class with the specified name.static PhysicalConnectionHandlingMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IMMEDIATE_ACQUISITION_AND_HOLD
TheConnection
will be acquired as soon as the session is opened and held until the session is closed. This is the only valid combination including immediate acquisition of the Connection -
DELAYED_ACQUISITION_AND_HOLD
TheConnection
will be acquired as soon as it is needed and then held until the session is closed. This is the original Hibernate behavior. -
DELAYED_ACQUISITION_AND_RELEASE_AFTER_STATEMENT
TheConnection
will be acquired as soon as it is needed; it will be released after each statement is executed. -
DELAYED_ACQUISITION_AND_RELEASE_BEFORE_TRANSACTION_COMPLETION
public static final PhysicalConnectionHandlingMode DELAYED_ACQUISITION_AND_RELEASE_BEFORE_TRANSACTION_COMPLETIONTheConnection
will be acquired as soon as it is needed; it will be released before commit or rollback. -
DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTION
public static final PhysicalConnectionHandlingMode DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTIONTheConnection
will be acquired as soon as it is needed; it will be released after each transaction is completed.
-
-
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
-
getAcquisitionMode
-
getReleaseMode
-
interpret
-
interpret
public static PhysicalConnectionHandlingMode interpret(ConnectionAcquisitionMode acquisitionMode, ConnectionReleaseMode releaseMode)
-