[ 
https://issues.apache.org/jira/browse/AMQ-3681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254660#comment-13254660
 ] 

Gary Tully edited comment on AMQ-3681 at 4/16/12 12:45 PM:
-----------------------------------------------------------

Unfortunately the embedded derby jdbc store used in the unit tests does not 
support java.sql.Statement#setQueryTimeout

We need to use it in an oracle specific lock implementation of make its use 
configurable

org.apache.activemq.usecases.JdbcDurableSubDupTest demonstrates
                
      was (Author: gtully):
    Unfortunately the embedded derby jdbc store used in the unit tests does not 
support java.sql.Statement#setQueryTimeout

We need to use it in an oracle specific lock implementation of make its use 
configurable

                  
> DatabaseLocker should first cancel locking SQL statement before closing the 
> SQL connection
> ------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3681
>                 URL: https://issues.apache.org/jira/browse/AMQ-3681
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>         Environment: ServiceMix 4.3
>            Reporter: metatech
>            Assignee: Rob Davies
>             Fix For: 5.6.0
>
>         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 :
> http://activemq.apache.org/jdbc-master-slave.html
> http://servicemix.apache.org/clustering.html
> 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(PhysicalConnection.java:1223)
>       - waiting to lock <0xad4367e0> (a oracle.jdbc.driver.T4CConnection)
>       at 
> org.apache.commons.dbcp.DelegatingConnection.isClosed(DelegatingConnection.java:386)
>       at 
> org.apache.commons.dbcp.DelegatingConnection.isClosed(DelegatingConnection.java:386)
>       at 
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.isClosed(PoolingDataSource.java:201)
>       at 
> org.apache.activemq.store.jdbc.DefaultDatabaseLocker.stop(DefaultDatabaseLocker.java:137)
>       at com.mycompany.PoolCloser.close(PoolCloser.java:77)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:221)
>       at 
> org.apache.aries.blueprint.container.ServiceListener.invokeMethod(ServiceListener.java:98)
>       at 
> org.apache.aries.blueprint.container.ServiceListener.unregister(ServiceListener.java:65)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to