activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "metatech (Commented) (JIRA)" <>
Subject [jira] [Commented] (AMQ-3681) DatabaseLocker should first cancel locking SQL statement before closing the SQL connection
Date Thu, 26 Jan 2012 14:50:40 GMT


metatech commented on AMQ-3681:

Another problem that can occur : 
when the network cable is unplugged, the ActiveMQ shutdown hook freezes because it cannot
close the connection, which is locked by the "DefaultDatabaseLocker.keepAlive" method.  The
"kill" command does not work, "kill -9" is needed.
Here is a second patch that also fixes this problem.
"ActiveMQ ShutdownHook" daemon prio=5 Thread id=73 BLOCKED
> DatabaseLocker should first cancel locking SQL statement before closing the SQL connection
> ------------------------------------------------------------------------------------------
>                 Key: AMQ-3681
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: ServiceMix 4.3
>            Reporter: metatech
>         Attachments: amq_stopping_slave.patch, amq_stopping_slave_2.patch
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> ActiveMQ is configured in a Master/Slave configuration with an Oracle database :
> When the slave node is stopping, "activemq-broker" stays forever in the "Stopping" state.
> This is because the locking SQL statement cannot be interrupted by just closing the JDBC
connection.  It is also needed to "cancel" the SQL statement.
> Here is a patch to DefaultDatabaseLocker which makes it compatible with Oracle.
> Thanks.
> {code}
> "Thread-92" prio=10 tid=0x08c4d800 nid=0x1036 waiting for monitor entry [0x8ab3a000]
>    java.lang.Thread.State: BLOCKED (on object monitor)
> 	at oracle.jdbc.driver.PhysicalConnection.isClosed(
> 	- waiting to lock <0xad4367e0> (a oracle.jdbc.driver.T4CConnection)
> 	at org.apache.commons.dbcp.DelegatingConnection.isClosed(
> 	at org.apache.commons.dbcp.DelegatingConnection.isClosed(
> 	at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.isClosed(
> 	at
> 	at com.mycompany.PoolCloser.close(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(
> 	at org.apache.aries.blueprint.container.ServiceListener.invokeMethod(
> 	at org.apache.aries.blueprint.container.ServiceListener.unregister(
> {code}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message