0 Replies Latest reply on Sep 23, 2005 5:17 AM by P V

    Connection Pooling

    P V Newbie


      I have some doubts about the implementation of connection pooling using JBoss.
      All I have to do it's to implement something like this?

       Context ctx = new InitialContext();
       ds = (DataSource)ctx.lookup("java:" + db);
       synchronized (ds) {
       connection = ds.getConnection();
       return connection;

      I used to have a singleton pattern class named PoolDB and everytime I needed a connection I did PoolDB.getConnection(), if it returned null I would create a new one, but I guess that in JBoss the process is being done by the server itself, right?