예제 #1
0
 @Override
 public Connection GetConnection() {
   // TODO Auto-generated method stub
   if (_boneCP == null) {
     System.out.println(String.format("line 56 ConnectionManager cp=null"));
   }
   try {
     _connection = _boneCP.getConnection();
   } catch (SQLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     System.out.println(e);
   }
   try {
     System.out.println(_connection.getCatalog());
   } catch (SQLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   return _connection;
 }
예제 #2
0
  public Connection getConnection() throws SQLException {

    Connection returnConnection = connectionPool.getConnection();
    openConnections.add(returnConnection);
    return returnConnection;
  }