-
1. Re: InUseConnections > MaxPoolSize... is this possible?
vickyk Sep 19, 2007 2:17 AM (in response to sancheski)"Sancheski" wrote:
Is this possible?
I have also checked the operation listInUseConnections() in service CachedConnectionManager, and I get an empty map. What I am guessing after seeing this is that the attribute InUseConnectionCount may be wrong.
By the way, I am using Jboss-4.2.0.GA.
Thanks a lot.
Yes it is possible , I will have to look at your -ds.xml file , seems that multiple subpools (4 in your case) are getting created in your application.Paste the contents of -ds.xml file here .
CachedConnectionManager.listInUseConnections() will tell you about the connections which are being used by the application at the moment when it is invoked , this will be helpful in finding the leaked connections . It is not related to the InUseConnectionCount value . -
2. Re: InUseConnections > MaxPoolSize... is this possible?
sancheski Sep 19, 2007 3:34 AM (in response to sancheski)Here is de ds
<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>
<no-tx-connection-factory>
<!-- Where to bind the datasource, under the "java:/" prefix -->
<jndi-name>LdapConnector</jndi-name>
<rar-name>10xxxx.ear#ldap-connector.rar</rar-name>
<connection-definition>com.hp.som.connector.CapabilityConnectionFactory</connection-definition>
<config-property name="ldapContextFactory" type="java.lang.String">com.sun.jndi.ldap.LdapCtxFactory</config-property>
<config-property name="providerUrl" type="java.lang.String">ldap://10.31.21.83:389/</config-property>
<config-property name="securityAuthentication" type="java.lang.String">SIMPLE</config-property>
<config-property name="securityPrincipal" type="java.lang.String">uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot</config-property>
<config-property name="securityCredentials" type="java.lang.String">admin</config-property>
<!-- The minimum number of connections a pool should hold -->
<min-pool-size>1</min-pool-size>
<!-- The maximum number of connections for a pool -->
<max-pool-size>3</max-pool-size>
<!-- The maximum time in milliseconds to block while waiting for a connection -->
<!-- before throwing an exception. Note that this blocks only while waiting -->
<!-- for a permit for a connection, and will never throw an exception if -->
<!-- creating a new connection takes an inordinately long time -->
<blocking-timeout-millis>3000</blocking-timeout-millis>
<!-- The maximum time in minutes a connection may be idle before being closed -->
<idle-timeout-minutes>0</idle-timeout-minutes>
<background-validation>true</background-validation>
<background-validation-minutes>1</background-validation-minutes>
</no-tx-connection-factory>
</connection-factories>
Hope it is helpful,
Thanks
David -
3. Re: InUseConnections > MaxPoolSize... is this possible?
vickyk Sep 19, 2007 4:15 AM (in response to sancheski)I don't see the configuration causing subpools to evolve , however I would also like to see the xml contents created when you deploy this connection descriptor file .
Can you search the contents in the server log file , the generated xml file should be looked after "[org.jboss.deployment.XSLSubDeployer] transformed into doc:" in the server log ?
This xml should contain ConnectionManager,JBossManagedConnectionPool etc mbeans , type the contents here let me have a look at it . -
4. Re: InUseConnections > MaxPoolSize... is this possible?
sancheski Sep 19, 2007 5:26 AM (in response to sancheski)Here you are:
2007-09-19 11:12:04,088 DEBUG [org.jboss.deployment.XSLSubDeployer] transformed into doc: <server> <mbean code='org.jboss.resource.connectionmanager.NoTxConnectionManager' display-name='ConnectionManager for ConnectionFactory LdapConnector' name='jboss.jca:service=NoTxCM,name=LdapConnector'> <depends optional-attribute-name='ManagedConnectionPool'> <mbean code='org.jboss.resource.connectionmanager.JBossManagedConnectionPool' display-name='Connection Pool for DataSource LdapConnector' name='jboss.jca:service=ManagedConnectionPool,name=LdapConnector'> <depends optional-attribute-name='ManagedConnectionFactoryName'> <mbean code='org.jboss.resource.connectionmanager.RARDeployment' display-name='ManagedConnectionFactory for ConnectionFactory LdapConnector' name='jboss.jca:service=ManagedConnectionFactory,name=LdapConnector'> <attribute name='ManagedConnectionFactoryProperties'> <properties> <config-property name='ldapContextFactory' type='java.lang.String'>com.sun.jndi.ldap.LdapCtxFactory</config-property> <config-property name='providerUrl' type='java.lang.String'>ldap://13.24.21.78:389/</config-property> <config-property name='securityAuthentication' type='java.lang.String'>SIMPLE</config-property> <config-property name='securityPrincipal' type='java.lang.String'>uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot</config-property> <config-property name='securityCredentials' type='java.lang.String'>admin</config-property> </properties> </attribute> <attribute name='RARName'>10sss.ear#ldap-connector.rar</attribute> <attribute name='ConnectionDefinition'>foo.bar.connector.CapabilityConnectionFactory</attribute> <depends optional-attribute-name='OldRarDeployment'>jboss.jca:service=RARDeployment,name='10sss.ear#ldap-connector.rar'</depends> </mbean> </depends> <attribute name='PoolJndiName'>LdapConnector</attribute> <attribute name='MinSize'>1</attribute> <attribute name='MaxSize'>3</attribute> <attribute name='BlockingTimeoutMillis'>3000</attribute> <attribute name='IdleTimeoutMinutes'>0</attribute> <attribute name='BackGroundValidation'>true</attribute> <attribute name='BackGroundValidationMinutes'>1</attribute> <attribute name='PreFill'>False</attribute> <attribute name='UseFastFail'>False</attribute> <attribute name='Criteria'>ByNothing</attribute> </mbean> </depends> <attribute name='JndiName'>LdapConnector</attribute> <depends optional-attribute-name='CachedConnectionManager'>jboss.jca:service=CachedConnectionManager</depends> </mbean> <mbean code='org.jboss.resource.connectionmanager.ConnectionFactoryBindingService' display-name='Binding for ConnectionFactory LdapConnector' name='jboss.jca:service=ConnectionFactoryBinding,name=LdapConnector'> <attribute name='JndiName'>LdapConnector</attribute> <attribute name='UseJavaContext'>true</attribute> <depends optional-attribute-name='ConnectionManager'>jboss.jca:service=NoTxCM,name=LdapConnector</depends> </mbean> </server> 2007-09-19 11:12:04,088 DEBUG [org.jboss.deployment.SARDeployer] Using existing deployment.document
Thanks a lot
David -
5. Re: InUseConnections > MaxPoolSize... is this possible?
adrian.brock Sep 21, 2007 10:36 AM (in response to sancheski)"Sancheski" wrote:
Hi all
I don't know if this situation may be reached. I have a ManagedConnectionPool with configuration:
BackGroundValidationMinutes = 1
MinPoolSize = 1
MaxPoolSize = 3
No IdleTimeout is set up.
After performing a load test, I get this results at the Mbean of my service:
AvailableConnectionCount = 1
ConnectionCount = 1
ConnectionCreatedCount = 6
ConnectionDestroyedCount = 5
(so far, everything seems to work fine)
and then, the "impossible" attribute value...
InUseConnectionCount = 4
Is this possible?
I have also checked the operation listInUseConnections() in service CachedConnectionManager, and I get an empty map. What I am guessing after seeing this is that the attribute InUseConnectionCount may be wrong.
By the way, I am using Jboss-4.2.0.GA.
Thanks a lot.
I don't see how that should be possible.
Can you try it without the background validation enabled, since that is new code in 4.2.x
Failing that, can you try doing a flush with TRACE logging enabled.
This will print out what connections it thinks are checked out and also some
basic information about the state they are in:public void flush() { ArrayList destroy = null; synchronized (cls) { if (trace) log.trace("Flushing pool checkedOut=" + checkedOut + " inPool=" + cls);