1: …… 2: private Connection conn; 3: 4: public Connection DBConnect(String url, String id, String password) { 5: try { 6: String CONNECT_STRING = url + ":" + id + ":" + password; 7: InitialContext ctx = new InitialContext(); 8: DataSource datasource = (DataSource) ctx.lookup(CONNECT_STRING); 9: conn = datasource.getConnection(); 10: } catch (SQLException e) { 11: //catch 블록이 비어있음 12: } catch (NamingException e) { 13: //catch 블록이 비어있음 14: } 15: return conn; 16: }