db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: ManagedConnections not being released
Date Thu, 12 Feb 2004 18:04:31 GMT
Hi,

Clute, Andrew wrote:

> I have the latest from head. I am using Jboss 3.2.3, with CM-tx for my
> EJB's. I have my connection pool set to a maximum of 30 connections, but
> it fills up real quick. I am closing the PersistenceBroker, and I have
> debuged, and I do see the _conn.close() being called on the Jboss
> WrappedConnection, but I look and all 30 connections are used.
> 
> 

hmm, I assume you are using proxy? This is problematic in a 3-tier 
environment, because how should the proxy be materialized on the client 
side? (by the way, try to set useAutoCommit="0")
But I don't know what's the reason for your exhausted con-pool, maybe a 
side-effect of the proxy use?

regards,
Armin

> Thoughts? I apologize in advance if this is a stupid configuration
> issue.
> 
> -Andrew
> 
> Here is my OJB repository datasource description:
> 
> <jdbc-connection-descriptor
> 	jcd-alias="devsql"
> 	default-connection="true"
>    	platform="MsSQLServer"
>    	jdbc-level="3.0"
>    	jndi-datasource-name="java:MsSqlDevDS"
>    	useAutoCommit="2"
>    	>
>    	<object-cache
> class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl">
>             <attribute attribute-name="timeout" attribute-value="900"/>
>             <attribute attribute-name="autoSync"
> attribute-value="true"/>
>        </object-cache>
>    		
>    	<sequence-manager
>  
> className="org.apache.ojb.broker.util.sequence.SequenceManagerMSSQLGuidI
> mpl" />
> 
> </jdbc-connection-descriptor> 
> 
> Here is my jBoss Datasource descriptor:
> 
> <datasources>
>   <local-tx-datasource>
>     <jndi-name>MsSqlDevDS</jndi-name>
>  
> <connection-url>jdbc:inetdae7:192.168.2.30:1433?<removed></connection-ur
> l>
>     <driver-class>com.inet.tds.TdsDriver</driver-class>
>     <min-pool-size>5</min-pool-size>
>     <max-pool-size>30</max-pool-size>
>     <idle-timeout-minutes>1</idle-timeout-minutes>
>     <check-valid-connection-sql>select 1</check-valid-connection-sql>
>   </local-tx-datasource> 
> </datasources>
> 
> And here is the error stack:
> 
> 12:29:49,906 ERROR [org.jboss.web.localhost.Engine]
> StandardWrapperValve[org.osn.webapp.jcore.doclib.docview_jsp]:
> Servlet.service() for servlet org.osn.webapp.jcore.doclib.docview_jsp
> threw exception
> org.apache.ojb.broker.PersistenceBrokerException:
> org.apache.ojb.broker.PersistenceBrokerException:
> org.apache.ojb.broker.PersistenceBrokerException: Used ConnectionManager
> instance could not obtain a connection
> 	at
> org.apache.ojb.broker.accesslayer.CollectionProxy.loadData(CollectionPro
> xy.java:158)
> 	at
> org.apache.ojb.broker.accesslayer.ListProxy.loadData(ListProxy.java:187)
> 	at
> org.apache.ojb.broker.accesslayer.CollectionProxy.getData(CollectionProx
> y.java:401)
> 	at
> org.apache.ojb.broker.accesslayer.CollectionProxy.iterator(CollectionPro
> xy.java:230)
> 	at
> org.osn.bom.Document.getCurrentDocumentVersion(Document.java:274)
> Caused by: org.apache.ojb.broker.PersistenceBrokerException:
> org.apache.ojb.broker.PersistenceBrokerException: Used ConnectionManager
> instance could not obtain a connection
> 	at
> org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que
> ryReferenceBroker.java:250)
> 	at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Pe
> rsistenceBrokerImpl.java:1012)
> 	at
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQu
> ery(DelegatingPersistenceBroker.java:312)
> 	at
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQu
> ery(DelegatingPersistenceBroker.java:312)
> 	at
> org.apache.ojb.broker.accesslayer.CollectionProxy.loadData(CollectionPro
> xy.java:148)
> 	... 51 more
> Caused by: org.apache.ojb.broker.PersistenceBrokerException: Used
> ConnectionManager instance could not obtain a connection
> 	at
> org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(
> StatementManager.java:680)
> 	at
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccess
> Impl.java:315)
> 	at
> org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObje
> ct.java:113)
> 	at
> org.apache.ojb.broker.accesslayer.RsIterator.<init>(RsIterator.java:211)
> 	at
> org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsIter
> atorFactoryImpl.java:97)
> 	at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(
> PersistenceBrokerImpl.java:1631)
> 	at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Pe
> rsistenceBrokerImpl.java:1136)
> 	at
> org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que
> ryReferenceBroker.java:143)
> 	at
> org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Que
> ryReferenceBroker.java:242)
> 	... 55 more
> Caused by: org.apache.ojb.broker.accesslayer.LookupException:
> SQLException thrown while trying to get Connection from Datasource
> (java:MsSqlDevDS)
> 	at
> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConne
> ctionFromDataSource(ConnectionFactoryAbstractImpl.java:200)
> 	at
> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupCo
> nnection(ConnectionFactoryAbstractImpl.java:97)
> 	at
> org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl.lookupCon
> nection(ConnectionFactoryManagedImpl.java:18)
> 	at
> org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(Co
> nnectionManagerImpl.java:144)
> 	at
> org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(
> StatementManager.java:676)
> 	... 63 more
> Caused by: org.jboss.util.NestedSQLException: No ManagedConnections
> available within configured blocking timeout ( 5000 [ms] ); - nested
> throwable: (javax.resource.ResourceException: No ManagedConnections
> available within configured blocking timeout ( 5000 [ms] ))
> 	at
> org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperD
> ataSource.java:106)
> 	at
> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConne
> ctionFromDataSource(ConnectionFactoryAbstractImpl.java:189)
> 	... 67 more
> Caused by: javax.resource.ResourceException: No ManagedConnections
> available within configured blocking timeout ( 5000 [ms] )
> 	at
> org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getCo
> nnection(InternalManagedConnectionPool.java:250)
> 	at
> org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool
> .getConnection(JBossManagedConnectionPool.java:496)
> 	at
> org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedCo
> nnection(BaseConnectionManager2.java:425)
> 	at
> org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConne
> ction(TxConnectionManager.java:318)
> 	at
> org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConn
> ection(BaseConnectionManager2.java:477)
> 	at
> org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionMa
> nagerProxy.allocateConnection(BaseConnectionManager2.java:814)
> 	at
> org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperD
> ataSource.java:102)
> 	... 68 more
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message