Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate
Class ConnectionReleaseMode  view ConnectionReleaseMode download ConnectionReleaseMode.java

java.lang.Object
  extended byorg.hibernate.ConnectionReleaseMode
All Implemented Interfaces:
java.io.Serializable

public class ConnectionReleaseMode
extends java.lang.Object
implements java.io.Serializable

Defines the various policies by which Hibernate might release its underlying JDBC connection.


Field Summary
static ConnectionReleaseMode AFTER_STATEMENT
          Indicates that JDBC connection should be aggressively released after each SQL statement is executed.
static ConnectionReleaseMode AFTER_TRANSACTION
          Indicates that JDBC connections should be released after each transaction ends (works with both JTA-registered synch and HibernateTransaction API).
private  java.lang.String name
           
static ConnectionReleaseMode ON_CLOSE
          Indicates that connections should only be released when the Session is explicitly closed or disconnected; this is the legacy (Hibernate2 and pre-3.1) behavior.
 
Constructor Summary
private ConnectionReleaseMode(java.lang.String name)
           
 
Method Summary
static ConnectionReleaseMode parse(java.lang.String modeName)
          Determine the correct ConnectionReleaseMode instance based on the given name.
private  java.lang.Object readResolve()
           
 java.lang.String toString()
          Override of Object.toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AFTER_STATEMENT

public static final ConnectionReleaseMode AFTER_STATEMENT
Indicates that JDBC connection should be aggressively released after each SQL statement is executed. In this mode, the application must explicitly close all iterators and scrollable results. This mode may only be used with a JTA datasource.


AFTER_TRANSACTION

public static final ConnectionReleaseMode AFTER_TRANSACTION
Indicates that JDBC connections should be released after each transaction ends (works with both JTA-registered synch and HibernateTransaction API). This mode may not be used with an application server JTA datasource.

This is the default mode starting in 3.1; was previously ON_CLOSE 55 .


ON_CLOSE

public static final ConnectionReleaseMode ON_CLOSE
Indicates that connections should only be released when the Session is explicitly closed or disconnected; this is the legacy (Hibernate2 and pre-3.1) behavior.


name

private java.lang.String name
Constructor Detail

ConnectionReleaseMode

private ConnectionReleaseMode(java.lang.String name)
Method Detail

toString

public java.lang.String toString()
Override of Object.toString(). Returns the release mode name.


parse

public static ConnectionReleaseMode parse(java.lang.String modeName)
                                   throws HibernateException
Determine the correct ConnectionReleaseMode instance based on the given name.


readResolve

private java.lang.Object readResolve()