0 Replies Latest reply on Nov 28, 2006 1:51 AM by ANDRIA-NTOANINA Herimiaina

    PostgreSQL Database pool connection problem

    ANDRIA-NTOANINA Herimiaina Newbie


      I'm using a postgreSQL v8.0 running in an other server.
      I'v set a value of 10 as a min pool in my postgre-ds.xml.
      Then, running ManageEngine Application Manager 7.
      AppManager show 0 pooled connection for my database but 5 for DefaultDS : Hypersonic Database.

      Here's a portion of postgre-ds.xml

       <!-- sql to call when connection is created-->
       <new-connection-sql>SELECT 1</new-connection-sql>
       <!-- sql to call on an existing pooled connection when it is obtained from pool
       <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

      My question is : Do JBoss creating the minimal pool when starting JBoss?
      Or maybe I'v a wrong setting in my XML?

      The problem : a first launch of my CMP Bean always fail. Throwing the next error:
      09:06:37,687 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=Herimiaina/67, BranchQual=, localId=67] errorCode=XA_UNKNOWN(0)
      org.jboss.resource.connectionmanager.JBossLocalXAException: Error trying to start local tx: ; - nested throwable: (org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported
       at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.start(TxConnectionManager.java:901)
       at org.jboss.tm.TransactionImpl$Resource.startResource(TransactionImpl.java:2043)
       at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:563)

      But reruning the bean immediatly success.

      I'v trying it using BMP now. When getting the connection in setContext()
      , I got the same problem. To solve it, I loop my code 4 time until I get a valid connection. And this work but add a heavy load to JBoss.