users@glassfish.java.net

Re: bad database connection handling in ejb 3

From: <glassfish_at_javadesktop.org>
Date: Mon, 29 Jun 2009 20:23:20 PDT

Yes, I did turned on validation. Here is the configuration of my connection pool.

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="org.postgresql.ds.PGSimpleDataSource" fail-all-connections="true" idle-timeout-in-seconds="300" is-connection-validation-required="true" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="48" max-wait-time-in-millis="60000" name="testPool" non-transactional-connections="false" pool-resize-quantity="4" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
      <property name="user" value="test"/>
      <property name="PortNumber" value="5432"/>
      <property name="password" value="test123"/>
      <property name="ServerName" value="10.1.1.1"/>
      <property name="DatabaseName" value="testdb"/>
    </jdbc-connection-pool>


Since we use JPA "EntityManager" for all query execution, I have no idea of where I can get the raw connection that bound to entity manager. This problem is seriously blocking us from putting glassfish on production environment, where we have database fail-over. The bad connection problem can't work with db fail-over.
[Message sent by forum member 'greenplum' (greenplum)]

http://forums.java.net/jive/thread.jspa?messageID=353505