| AbstractPoolableObject.java |
/* JFox, the OpenSource J2EE Application Server
*
* Copyright (C) 2002 huihoo.com
* Distributable under GNU LGPL license
* See the GNU Lesser General Public License for more details.
*/
package org.huihoo.jfox.pool;
/**
*
* @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
*/
public abstract class AbstractPoolableObject implements PoolableObject {
private boolean available = false;
public void activate() throws Exception {
available = true;
}
// 该对象返回到池中,不再可用
public void passivate() throws Exception {
available = false;
}
public boolean isAvailable() {
return available;
}
}