5 Replies Latest reply on Nov 1, 2002 4:14 PM by T. C. Link

    Question about XADatasource connection pool

    Lih-Ji Wang Newbie

      I've been reading through all connection pool related topics, however, I found no conclusive answers. Hope someone can help me clarify some concepts about connection pool questions. I'm using Oracle 8.1.7 and JBoss 3.0. Currently, I was able to configure XADatasource to Oracle database and able to get resultset back for manipulation with the following codes:

      InitialContext ic = new InitialContext();
      DataSource ds = (DataSource)ic.lookup("java:/XAOracleDS");
      Connection conn = ds.getConnection();
      ...do somthing with the connection
      } catch(Exception e){

      However, if I tried to get another connection before the first connection closed, I got exception raised as follows:

      11:21:59,163 WARN [TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=54111-IRM//72, BranchQual=] errorCode=XA_RETRY
      at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:498)
      at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:190)
      at org.jboss.tm.TxCapsule.startResource(TxCapsule.java:1180)
      at org.jboss.tm.TxCapsule.enlistResource(TxCapsule.java:671)......

      I was able to do get another connection before the current connection closed using non-XADatasource. Can someone please help me to clarify this? And, how do I verify that I do get connection pooled. Thanks in advanced.