public enum ConnectionReleaseMode extends Enum<ConnectionReleaseMode>
ConnectionAcquisitionMode
.Enum Constant and Description |
---|
AFTER_STATEMENT
Indicates that JDBC connection should be aggressively released after each
SQL statement is executed.
|
AFTER_TRANSACTION
Indicates that JDBC connections should be released after each transaction
ends (works with both JTA-registered synch and HibernateTransaction API).
|
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.
|
Modifier and Type | Method and Description |
---|---|
static ConnectionReleaseMode |
parse(String name)
Alias for
valueOf(String) using upper-case version of the incoming name. |
static ConnectionReleaseMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConnectionReleaseMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionReleaseMode AFTER_STATEMENT
public static final ConnectionReleaseMode AFTER_TRANSACTION
ON_CLOSE
.public static final ConnectionReleaseMode ON_CLOSE
public static ConnectionReleaseMode[] values()
for (ConnectionReleaseMode c : ConnectionReleaseMode.values()) System.out.println(c);
public static ConnectionReleaseMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static ConnectionReleaseMode parse(String name)
valueOf(String)
using upper-case version of the incoming name.name
- The name to parseCopyright © 2016 JBoss by Red Hat. All rights reserved.