Top Description Fields Constructors Methods
org.hibernate.resource.jdbc.spi

public final Enum PhysicalConnectionHandlingMode

extends Enum<PhysicalConnectionHandlingMode>
Class Inheritance
Imports
java.util.Locale, org.hibernate.ConnectionAcquisitionMode, .ConnectionReleaseMode, org.hibernate.internal.util.StringHelper

Represents valid combinations of ConnectionAcquisitionMode and ConnectionReleaseMode
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final ConnectionAcquisitionMode
public static final PhysicalConnectionHandlingMode
DELAYED_ACQUISITION_AND_HOLD

The Connection will be acquired as soon as it is needed and then held until the Session is closed.

public static final PhysicalConnectionHandlingMode
DELAYED_ACQUISITION_AND_RELEASE_AFTER_STATEMENT

The Connection will be acquired as soon as it is needed; it will be released after each statement is executed.

public static final PhysicalConnectionHandlingMode
DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTION

The Connection will be acquired as soon as it is needed; it will be released after each transaction is completed.

public static final PhysicalConnectionHandlingMode
DELAYED_ACQUISITION_AND_RELEASE_BEFORE_TRANSACTION_COMPLETION

The Connection will be acquired as soon as it is needed; it will be released before commit/rollback.

public static final PhysicalConnectionHandlingMode
IMMEDIATE_ACQUISITION_AND_HOLD

The Connection will be acquired as soon as the Session is opened and held until the Session is closed.

private final ConnectionReleaseMode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public ConnectionAcquisitionMode
public ConnectionReleaseMode
public static PhysicalConnectionHandlingMode
interpret(Object setting)

public static PhysicalConnectionHandlingMode
public static PhysicalConnectionHandlingMode
public static PhysicalConnectionHandlingMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

acquisitionModeback to summary
private final ConnectionAcquisitionMode acquisitionMode
DELAYED_ACQUISITION_AND_HOLDback to summary
public static final PhysicalConnectionHandlingMode DELAYED_ACQUISITION_AND_HOLD

The Connection 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_STATEMENTback to summary
public static final PhysicalConnectionHandlingMode DELAYED_ACQUISITION_AND_RELEASE_AFTER_STATEMENT

The Connection will be acquired as soon as it is needed; it will be released after each statement is executed.

DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTIONback to summary
public static final PhysicalConnectionHandlingMode DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTION

The Connection will be acquired as soon as it is needed; it will be released after each transaction is completed.

DELAYED_ACQUISITION_AND_RELEASE_BEFORE_TRANSACTION_COMPLETIONback to summary
public static final PhysicalConnectionHandlingMode DELAYED_ACQUISITION_AND_RELEASE_BEFORE_TRANSACTION_COMPLETION

The Connection will be acquired as soon as it is needed; it will be released before commit/rollback.

IMMEDIATE_ACQUISITION_AND_HOLDback to summary
public static final PhysicalConnectionHandlingMode IMMEDIATE_ACQUISITION_AND_HOLD

The Connection 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

releaseModeback to summary
private final ConnectionReleaseMode releaseMode

Constructor Detail

PhysicalConnectionHandlingModeback to summary
private PhysicalConnectionHandlingMode(ConnectionAcquisitionMode acquisitionMode, ConnectionReleaseMode releaseMode)

Method Detail

getAcquisitionModeback to summary
public ConnectionAcquisitionMode getAcquisitionMode()
getReleaseModeback to summary
public ConnectionReleaseMode getReleaseMode()
interpretback to summary
public static PhysicalConnectionHandlingMode interpret(Object setting)
interpretback to summary
public static PhysicalConnectionHandlingMode interpret(ConnectionAcquisitionMode acquisitionMode, ConnectionReleaseMode releaseMode)
valueOfback to summary
public static PhysicalConnectionHandlingMode valueOf(String name)
valuesback to summary
public static PhysicalConnectionHandlingMode[] values()