Connection Pool
-
확장된 ConnectionPool1클래스 예제컴퓨터 2008. 1. 27. 20:44
import java.sql.*; import java.util.*; public class ConnectionPool1 { private static ConnectionPool1 cp = null; private ConnectionFactory1 cf = null; private Vector pool = null; private int initCon = 0; private int maxCon = 0; private int users = 0; private ConnectionPool1(int initCon, int maxCon) throws SQLException { this.initCon = initCon; this.maxCon = maxCon; cf = new ConnectionFactory1(); ..
-
Connection Pool을 생성하는 예제(기본)컴퓨터 2008. 1. 27. 20:22
import java.sql.*; import java.util.*; public class ConnectionPool { private static ConnectionPool cp = null; private ConnectionFactory1 cf = null; private Vector pool = null; private ConnectionPool() { cf = new ConnectionFactory1(); pool = new Vector(); } public static synchronized ConnectionPool getInstance() { if (cp == null) { cp = new ConnectionPool(); } return cp; } public synchronized Con..