Class DBReadReplica

java.lang.Object
org.compiere.util.DBReadReplica

public class DBReadReplica extends Object
  • Constructor Details

    • DBReadReplica

      public DBReadReplica()
  • Method Details

    • prepareNormalReadReplicaStatement

      public static PreparedStatement prepareNormalReadReplicaStatement(String sql, int resultSetType, int resultSetConcurrency, String trxName)
      Prepare Normal Read Replica Statement
      Parameters:
      sql - sql statement
      resultSetType - - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE
      resultSetConcurrency - - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
      trxName - transaction
      Returns:
      Prepared Statement (from replica if possible, otherwise null)
    • closeReadReplicaStatement

      public static void closeReadReplicaStatement(Statement st)
    • getConnectionRO

      public static Connection getConnectionRO()