[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - PostgreSQL Database pool connection problem

ANDRIA-NTOANINA do-not-reply at jboss.com
Tue Nov 28 01:51:28 EST 2006


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

  | <min-pool-size>5</min-pool-size>
  |     <max-pool-size>150</max-pool-size>
  |     <idle-timeout-minutes>20</idle-timeout-minutes>
  |         <!-- 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) -->
  |       <metadata>

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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989167#3989167

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989167

More information about the jboss-user mailing list