4 Replies Latest reply on Dec 9, 2003 7:48 PM by anthrope

    Using connection pool in a class (not ejb, servlet ...)

    Vijay Kandy Newbie

      Hello all,

      I am able to lookup a connection pool from within an EJB. I can do from a servlet also. I need to lookup from a class that is neither a servet nor an ejb. How do I do that? From an ejb, I lookup this way:

      Context context = new InitialContext();
      DataSource ds = (DataSource)context.lookup("java:/jdbc/PBOPool");
      connection = ds.getConnection();

      Thank you,