Package org.idempiere.db.util
Class AutoCommitConnectionBroker
java.lang.Object
org.idempiere.db.util.AutoCommitConnectionBroker
This class managed the sharing of non-transaction connection per thread.
- Author:
- hengsin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionRetrieve non-transaction connection for current thread.
If none have been allocated yet, a new one will be created from the connection pool.static voidreleaseConnection(Connection conn) Release connection.
-
Constructor Details
-
AutoCommitConnectionBroker
public AutoCommitConnectionBroker()
-
-
Method Details
-
getConnection
Retrieve non-transaction connection for current thread.
If none have been allocated yet, a new one will be created from the connection pool.- Returns:
- Connection
-
releaseConnection
Release connection. The connection goes back to connection pool if reference count is zero.- Parameters:
conn-
-