Example #1
0
 public static void removeConnPool(long id) {
   Object o = DBConnPool.getPoolMap().get("_OuterDatabase_" + id + ".");
   if (o == null) {
     return;
   }
   DBConnPoolImpl pool = (DBConnPoolImpl) o;
   pool.clear();
   DBConnPool.getPoolMap().remove("_OuterDatabase_" + id + ".");
 }
Example #2
0
 public static DBConnConfig getDBConnConfig(long id) {
   if (initFlag) {
     synchronized (mutex) {
       if (initFlag) {
         init();
         initFlag = false;
       }
     }
   }
   return DBConnPool.getDBConnConfig("_OuterDatabase_" + id);
 }
Example #3
0
 public static void addConnPool(ZCDatabaseSchema db) {
   DBConnConfig dcc = new DBConnConfig();
   dcc.DBName = db.getDBName();
   dcc.DBPassword = db.getPassword();
   dcc.DBPort = (int) db.getPort();
   dcc.DBServerAddress = db.getAddress();
   dcc.DBType = db.getServerType();
   dcc.DBUserName = db.getUserName();
   dcc.PoolName = ("_OuterDatabase_" + db.getID());
   dcc.TestTable = db.getTestTable();
   dcc.isLatin1Charset = "Y".equals(db.getLatin1Flag());
   if (!DBConnPool.getPoolMap().containsKey(dcc.PoolName + ".")) new DBConnPoolImpl(dcc);
 }