dbpool (1) 썸네일형 리스트형 [tomcat] db pool 설정 server.xml context.xml db pool 소스 public class DBConnPool { public Connection con; public Statement stmt; public PreparedStatement psmt; public ResultSet rs; public DBConnPool() { try { Context initCtx = new InitialContext(); Context ctx = (Context)initCtx.lookup("java:comp/env"); DataSource source = (DataSource)ctx.lookup("jdbc/oracle"); con = source.getConnection(); System.out.println("DB 커넥션 .. 이전 1 다음