users@glassfish.java.net

Re: Ping resets connection pool in V2?

From: <glassfish_at_javadesktop.org>
Date: Thu, 22 Apr 2010 09:35:07 PDT

That's interesting you say that. This happened with two different pools, one to MySQL, the other to MS SQL Server. Some further evidence is that when we did the ping we were monitoring the pool with the Glassfish Performance monitor. The monitor page then showed a message at the top that said it was no longer valid, and another node in the left-hand tree showed up for the connection pool. Switching to that new page allowed us to continue monitoring the pool. The connection statistics had all reset at that point (went from 600 connections created, 15 available, etc. to 8 connections created and 8 available).

Also there were many entries like this in the log when Ping was pressed:
[#|2010-04-21T15:39:07.078-0600|WARNING|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=266;_ThreadName=httpSSLWorkerThread-8181-194;b5_connection_pool: No Pool Meta Data object associated with the pool : b5_connection_pool. Try redeploying the application. ;_RequestID=980094bf-2d0c-42da-961e-74de19a73a5d;|RAR5114 : Error allocating connection : [b5_connection_pool: No Pool Meta Data object associated with the pool : b5_connection_pool. Try redeploying the application. ]|#]

[#|2010-04-21T15:39:05.008-0600|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8181-3;_RequestID=745a649b-9de8-4bff-9399-54a37d6a5a6d;|
java.lang.NullPointerException

and

[#|2010-04-21T15:36:00.815-0600|WARNING|sun-appserver2.1|javax.enterprise.system.tools.admin|_ThreadID=522;_ThreadName=RMI TCP Connection(12982)-192.168.42.112;_RequestID=fce81c22-0db1-4394-89df-4dc3a3a0871d;|MonitoringStatsImplBase: the com.sun.appserv Delegate MBean for AMX MBean null threw an exception: javax.management.InstanceNotFoundException: This operation failed, because it could not be handled by this domain.
An example of such an operation is creating application server instances or clusters when they are not supported by the given domain.
The actual error is: MBean instance not found: com.sun.appserv:name=gp_connection_pool,type=jdbc-connection-pool,category=monitor,server=server, stack =


But given a few seconds for glassfish to automatically restart/redeploy the pool, everything then started working.

Where in the glassfish source code would be a good place to look to investigate this further?

One connection pool:
[code]
<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="true" connection-leak-timeout-in-seconds="200" connection-validation-method="auto-commit"
datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="true"
is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0"
max-pool-size="32" max-wait-time-in-millis="60000" name="b5_connection_pool" non-transactional-connections="true" pool-resize-quantity="2"
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="ProfileSql" value="false"/>
      <property name="Port" value="3306"/>
      <property name="LoginTimeout" value="0"/>
      <property name="Password" value="****"/>
      <property name="User" value="****"/>
      <property name="PortNumber" value="3306"/>
      <property name="Url" value="jdbc:mysql://hostname:3306/"/>
      <property name="URL" value="jdbc:mysql://hostname:3306/"/>
      <property name="ServerName" value="hostname"/>
    </jdbc-connection-pool>
[/code]

The other:
[code]
<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="true" connection-leak-timeout-in-seconds="300" connection-validation-method="auto-commit"
datasource-classname="com.microsoft.sqlserver.jdbc.SQLServerDataSource" fail-all-connections="false" idle-timeout-in-seconds="300"
is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false"
match-connections="false" max-connection-usage-count="0" max-pool-size="65" max-wait-time-in-millis="60000" name="gp_connection_pool"
non-transactional-connections="false" pool-resize-quantity="2" 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="****"/>
      <property name="password" value="****"/>
      <property name="portNumber" value="1433"/>
      <property name="SelectMethod" value="cursor"/>
      <property name="databaseName" value="****"/>
      <property name="serverName" value="hostname"/>
    </jdbc-connection-pool>
[/code]
[Message sent by forum member 'culli']

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