3 Replies Latest reply on May 2, 2002 10:25 AM by John Walshe

    How to Pool Connections

    John Walshe Newbie

      I am trying to set up a pool of Connections in JBoss. I have written an RA that manages connections to a XML/HTTP source. I want to have the app server have 4 connections pooled so that everytime I do a JNDI lookup one of them is returned, right now I get a new connection created everytime. I am using NoTransaction as my transaction support.

      This is the JNDI I am using
      InitialContext iniCtx = new InitialContext();
      Object ref= iniCtx.lookup("java:comp/env/XConn");
      XConnectionFactory xcf = (XConnectionFactory) ref;
      xurlconn = (XURLConnection) xcf.getConnection();

      Any idea's on what I am doing wrong.