Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.8.0
-
None
-
None
-
tested on trunk.
Description
Broker is configured to use JDBCIOExceptionHandler.
When the JDBCPersistence DB is stopped during a message send the broker returns the following javax.jms.JMSException back to the client rather than closing the connection.
This results in the client having to deal with the exception instead of the failover transport having to deal with a connection loss and redeliver the message. Failover transport and transport connection loss seems to be the approach used when other SQL exceptions are thrown.
Exception received on client side: javax.jms.JMSException: ORA-01089: immediate shutdown in progress - no operation s are permitted at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSuppo rt.java:54) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect ion.java:1391) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect ion.java:1319) at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1798) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProdu cer.java:289) at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProdu cer.java:224) at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessa geProducerSupport.java:241) at com.acme.MyPublisher.doIt(MyPublisher.java:50) at com.acme.MyPublisher.main(MyPublisher.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: ORA-01089: immediate shutdown in progress - no o perations are permitted at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport .java:45) at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionCo ntext.java:141) at org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessag eStore.java:129) at org.apache.activemq.store.memory.MemoryTransactionStore.addMessage(Me moryTransactionStore.java:327) at org.apache.activemq.store.memory.MemoryTransactionStore$2.asyncAddTop icMessage(MemoryTransactionStore.java:190) at org.apache.activemq.broker.region.Topic.doMessageSend(Topic.java:471) at org.apache.activemq.broker.region.Topic.send(Topic.java:435) at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion. java:406) at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java :392) at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegion Broker.java:282) at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129) at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeD estinationBroker.java:96) at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.j ava:317) at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilt er.java:135) at org.apache.activemq.broker.TransportConnection.processMessage(Transpo rtConnection.java:499) at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.jav a:749) at org.apache.activemq.broker.TransportConnection.service(TransportConne ction.java:329) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC onnection.java:184) at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport .java:50) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireForm atNegotiator.java:113) at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(Abs tractInactivityMonitor.java:288) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSup port.java:83) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.jav a:214) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java: 196) ... 1 more Caused by: java.lang.Throwable: java.sql.BatchUpdateException: ORA-01089: immedi ate shutdown in progress - no operations are permitted at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePrepare dStatement.java:10296) at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatemen tWrapper.java:216) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewPr oxyPreparedStatement.java:1723) at org.apache.activemq.store.jdbc.TransactionContext.executeBatch(Transa ctionContext.java:106) at org.apache.activemq.store.jdbc.TransactionContext.executeBatch(Transa ctionContext.java:84) at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionCo ntext.java:132)
Will attach a test case soon.
Attachments
Attachments
Issue Links
- is related to
-
AMQ-4643 JDBCPersistence DB stopped during message send with JDBCIOExceptionHandler configured; IOException/SQLException is sent back (sometimes) to the client before the transport connector is shutdown
- Resolved