Package org.tamacat.pool.impl

Source Code of org.tamacat.pool.impl.ConnectionFactory

/*
* Copyright (c) 2008, TamaCat.org
* All rights reserved.
*/
package org.tamacat.pool.impl;

import org.tamacat.pool.ObjectActivateException;
import org.tamacat.pool.PoolableObjectFactory;

public class ConnectionFactory implements PoolableObjectFactory<Connection> {

    public void activate(Connection object) {
        if (object == null) throw new ObjectActivateException();
    }

    public Connection create() {
        return new Connection();
    }

    public boolean validate(Connection object) {
        return object != null ? true : false;
    }

    public void destroy(Connection object) {
    }
}
TOP

Related Classes of org.tamacat.pool.impl.ConnectionFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.