Enum PhysicalConnectionHandlingMode

    • Enum Constant Detail

      • IMMEDIATE_ACQUISITION_AND_HOLD

        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
      • DELAYED_ACQUISITION_AND_HOLD

        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_STATEMENT

        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_BEFORE_TRANSACTION_COMPLETION

        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.
      • DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTION

        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.
    • Method Detail

      • values

        public static PhysicalConnectionHandlingMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PhysicalConnectionHandlingMode c : PhysicalConnectionHandlingMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PhysicalConnectionHandlingMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null