Exemplo n.º 1
0
 /**
  * 将对象放入对象池中
  *
  * @param poolname 对象池名称
  * @param objectName 对象的名称
  * @param object 对象
  */
 public void checkInObject(String poolname, String objectName, Object object) {
   lock.lock();
   try {
     ObjectPool pool = (ObjectPool) pools.get(poolname);
     if (pool != null) {
       pool.checkIn(objectName, object);
       pools.put(poolname, pool);
     }
   } finally {
     lock.unlock();
   }
 }
 public void returnConnection(Connection c) {
   super.checkIn(c);
 }