Interesting. I guess we haven't seen it before cause people don't call dispose 
that often. 

Please open a Jira. 

Thanks,
Andrus

On Nov 23, 2010, at 5:54 PM, Laurent Marchal wrote:

> Hi all,
> 
>    I'm using cayenne 3.0 ans I'm experiencing a deadlock when I exit my 
> application. I call PoolManager.dispose() to disconnect all connections, but 
> it seems if at the same time a pooled connection is returned to the pool then 
> it deadlocks.
> 
> Here is the deadlock as detected by the java console.
> 
> Thanks,
> Laurent Marchal.
> 
> Name: Worker-2
> State: BLOCKED on com.sma.core.net.opconpoolmana...@197871d owned by: main
> Total blocked: 327  Total waited: 475
> 
> Stack trace:
> org.apache.cayenne.conn.PoolManager.connectionClosed(PoolManager.java:438)
> org.apache.cayenne.conn.PooledConnectionImpl.connectionClosedNotification(PooledConnectionImpl.java:181)
>   - locked java.util.collections$synchronizedrandomaccessl...@12a12fc
> org.apache.cayenne.conn.PooledConnectionImpl.returnConnectionToThePool(PooledConnectionImpl.java:146)
> org.apache.cayenne.conn.ConnectionWrapper.close(ConnectionWrapper.java:127)
> org.apache.cayenne.access.ExternalTransaction.close(ExternalTransaction.java:168)
> org.apache.cayenne.access.ExternalTransaction.commit(ExternalTransaction.java:105)
> 
> _______________________________________________________________________________________________________
> 
> Name: main
> State: BLOCKED on java.util.collections$synchronizedrandomaccessl...@12a12fc 
> owned by: Worker-2
> Total blocked: 30  Total waited: 122
> 
> Stack trace:
> org.apache.cayenne.conn.PooledConnectionImpl.removeConnectionEventListener(PooledConnectionImpl.java:97)
> org.apache.cayenne.conn.PoolManager.dispose(OpconPoolManager.java:169)
>   - locked org.apache.cayenne.conn.poolmana...@197871d
> com.sma.core.session.Session.disconnect(Session.java:189)
>   - locked java.lang.obj...@167a300
> com.sma.core.session.Session.logout(Session.java:269)
>   - locked java.lang.obj...@167a300
> 

Reply via email to