Class AutoCommitConnectionBroker

java.lang.Object
org.idempiere.db.util.AutoCommitConnectionBroker

public class AutoCommitConnectionBroker extends Object
This class managed the sharing of non-transaction connection per thread.
Author:
hengsin
  • Constructor Details

    • AutoCommitConnectionBroker

      public AutoCommitConnectionBroker()
  • Method Details

    • getConnection

      public static Connection 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

      public static void releaseConnection(Connection conn)
      Release connection. The connection goes back to connection pool if reference count is zero.
      Parameters:
      conn -