activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blah <hwang.sh...@gmail.com>
Subject clean shutdown of message listeners with activemq 4.0.1 and spring 2.0
Date Sat, 15 Jul 2006 01:47:00 GMT

I have written some MDP's using activemq 4.0.1 and spring 2.0's
DefaultMessageListenerContainer.  I am correctly receiving messages
asynchronously; my question now is how to cleanly shutdown my message
listener.  I've tried DefaultMessageListenerContainer.stop(), which
according to the API is supposed to invoke the underlying JMS Connection's
stop() method.  However, nothing seems to happen with ActiveMQ; i.e., I am
still receiving messages even after invoking the stop() method on
DefaultMessageListenerContainer.  I have found the following related bug
report, which has a resolution of "won't fix":

https://issues.apache.org/activemq/browse/AMQ-454

I've tried just calling System.exit() when I want to stop my listeners, but
that seems to corrupt the state of the activemq broker.  Since the next time
I start my listeners, I get the following exceptions.  Any help would be
greatly appreciated!

2006-07-14 18:38:01,829 [SimpleAsyncTaskExecutor-1] ERROR
org.springframework.jms.listener.DefaultMessageListenerContainer - Setup of
JMS message listener invoker failed
javax.jms.JMSException: java.io.IOException: Failed to broker message:
ID:shawnh-3812-1152923224067-1:0:1:1:3988 in container: java.io.IOException:
Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: java.net.BindException: Address already in use: connect

STACKTRACE:

java.net.SocketException: java.net.BindException: Address already in use:
connect
	at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
	at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
	at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
	at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
	at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
	at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
	at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doGetMessage(DefaultJDBCAdapter.java:260)
	at
org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(JDBCMessageStore.java:99)
	at
org.apache.activemq.store.journal.JournalMessageStore.getMessage(JournalMessageStore.java:328)
	at org.apache.activemq.broker.region.Queue.loadMessage(Queue.java:323)
	at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:108)
	at
org.apache.activemq.filter.MessageEvaluationContext.getMessage(MessageEvaluationContext.java:54)
	at
org.apache.activemq.filter.MessageEvaluationContext.isDropped(MessageEvaluationContext.java:47)
	at
org.apache.activemq.filter.PropertyExpression.evaluate(PropertyExpression.java:151)
	at
org.apache.activemq.filter.ComparisonExpression$1.evaluate(ComparisonExpression.java:196)
	at
org.apache.activemq.filter.ComparisonExpression.matches(ComparisonExpression.java:419)
	at
org.apache.activemq.broker.region.AbstractSubscription.matches(AbstractSubscription.java:91)
	at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:162)
	at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:171)
	at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:293)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:77)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:86)
	at
org.apache.activemq.broker.AbstractConnection.processAddConsumer(AbstractConnection.java:427)
	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:295)
	at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
	at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:45)
	at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1118)
	at
org.apache.activemq.ActiveMQSession.syncSendPacket(ActiveMQSession.java:1667)
	at
org.apache.activemq.ActiveMQMessageConsumer.<init>(ActiveMQMessageConsumer.java:196)
	at
org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:840)
	at
org.apache.activemq.pool.PooledSession.createConsumer(PooledSession.java:212)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.createConsumer(DefaultMessageListenerContainer.java:464)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.createListenerConsumer(DefaultMessageListenerContainer.java:312)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.initResourcesIfNecessary(DefaultMessageListenerContainer.java:524)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:514)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:486)
	at
org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to broker
message: ID:shawnh-3812-1152923224067-1:0:1:1:3988 in container:
java.io.IOException: Communications link failure due to underlying
exception: 

** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: java.net.BindException: Address already in use: connect

STACKTRACE:

java.net.SocketException: java.net.BindException: Address already in use:
connect
	at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
	at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
	at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
	at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
	at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
	at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
	at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doGetMessage(DefaultJDBCAdapter.java:260)
	at
org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(JDBCMessageStore.java:99)
	at
org.apache.activemq.store.journal.JournalMessageStore.getMessage(JournalMessageStore.java:328)
	at org.apache.activemq.broker.region.Queue.loadMessage(Queue.java:323)
	at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:108)
	at
org.apache.activemq.filter.MessageEvaluationContext.getMessage(MessageEvaluationContext.java:54)
	at
org.apache.activemq.filter.MessageEvaluationContext.isDropped(MessageEvaluationContext.java:47)
	at
org.apache.activemq.filter.PropertyExpression.evaluate(PropertyExpression.java:151)
	at
org.apache.activemq.filter.ComparisonExpression$1.evaluate(ComparisonExpression.java:196)
	at
org.apache.activemq.filter.ComparisonExpression.matches(ComparisonExpression.java:419)
	at
org.apache.activemq.broker.region.AbstractSubscription.matches(AbstractSubscription.java:91)
	at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:162)
	at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:171)
	at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:293)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:77)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:86)
	at
org.apache.activemq.broker.AbstractConnection.processAddConsumer(AbstractConnection.java:427)
	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:295)
	at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
	at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
	at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:115)
	at
org.apache.activemq.filter.MessageEvaluationContext.getMessage(MessageEvaluationContext.java:54)
	at
org.apache.activemq.filter.MessageEvaluationContext.isDropped(MessageEvaluationContext.java:47)
	at
org.apache.activemq.filter.PropertyExpression.evaluate(PropertyExpression.java:151)
	at
org.apache.activemq.filter.ComparisonExpression$1.evaluate(ComparisonExpression.java:196)
	at
org.apache.activemq.filter.ComparisonExpression.matches(ComparisonExpression.java:419)
	at
org.apache.activemq.broker.region.AbstractSubscription.matches(AbstractSubscription.java:91)
	at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:162)
	at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:171)
	at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:293)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:77)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:86)
	at
org.apache.activemq.broker.AbstractConnection.processAddConsumer(AbstractConnection.java:427)
	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:295)
	at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Failed to broker message:
ID:shawnh-3812-1152923224067-1:0:1:1:3988 in container: java.io.IOException:
Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: java.net.BindException: Address already in use: connect

STACKTRACE:

java.net.SocketException: java.net.BindException: Address already in use:
connect
	at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
	at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
	at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
	at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
	at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
	at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
	at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doGetMessage(DefaultJDBCAdapter.java:260)
	at
org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(JDBCMessageStore.java:99)
	at
org.apache.activemq.store.journal.JournalMessageStore.getMessage(JournalMessageStore.java:328)
	at org.apache.activemq.broker.region.Queue.loadMessage(Queue.java:323)
	at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:108)
	at
org.apache.activemq.filter.MessageEvaluationContext.getMessage(MessageEvaluationContext.java:54)
	at
org.apache.activemq.filter.MessageEvaluationContext.isDropped(MessageEvaluationContext.java:47)
	at
org.apache.activemq.filter.PropertyExpression.evaluate(PropertyExpression.java:151)
	at
org.apache.activemq.filter.ComparisonExpression$1.evaluate(ComparisonExpression.java:196)
	at
org.apache.activemq.filter.ComparisonExpression.matches(ComparisonExpression.java:419)
	at
org.apache.activemq.broker.region.AbstractSubscription.matches(AbstractSubscription.java:91)
	at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:162)
	at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:171)
	at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:293)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:77)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:86)
	at
org.apache.activemq.broker.AbstractConnection.processAddConsumer(AbstractConnection.java:427)
	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:295)
	at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
	at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
	at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:30)
	at
org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(JDBCMessageStore.java:106)
	at
org.apache.activemq.store.journal.JournalMessageStore.getMessage(JournalMessageStore.java:328)
	at org.apache.activemq.broker.region.Queue.loadMessage(Queue.java:323)
	at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:108)
	... 24 more
Caused by: java.io.IOException: Communications link failure due to
underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: java.net.BindException: Address already in use: connect

STACKTRACE:

java.net.SocketException: java.net.BindException: Address already in use:
connect
	at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
	at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
	at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
	at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
	at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
	at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
	at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doGetMessage(DefaultJDBCAdapter.java:260)
	at
org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(JDBCMessageStore.java:99)
	at
org.apache.activemq.store.journal.JournalMessageStore.getMessage(JournalMessageStore.java:328)
	at org.apache.activemq.broker.region.Queue.loadMessage(Queue.java:323)
	at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:108)
	at
org.apache.activemq.filter.MessageEvaluationContext.getMessage(MessageEvaluationContext.java:54)
	at
org.apache.activemq.filter.MessageEvaluationContext.isDropped(MessageEvaluationContext.java:47)
	at
org.apache.activemq.filter.PropertyExpression.evaluate(PropertyExpression.java:151)
	at
org.apache.activemq.filter.ComparisonExpression$1.evaluate(ComparisonExpression.java:196)
	at
org.apache.activemq.filter.ComparisonExpression.matches(ComparisonExpression.java:419)
	at
org.apache.activemq.broker.region.AbstractSubscription.matches(AbstractSubscription.java:91)
	at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:162)
	at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:171)
	at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:293)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:77)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:86)
	at
org.apache.activemq.broker.AbstractConnection.processAddConsumer(AbstractConnection.java:427)
	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:295)
	at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
	at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
	at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:42)
	at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:58)
	at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doGetMessage(DefaultJDBCAdapter.java:260)
	at
org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(JDBCMessageStore.java:99)
	... 27 more
Caused by: java.lang.Throwable: com.mysql.jdbc.CommunicationsException:
Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: java.net.BindException: Address already in use: connect

STACKTRACE:

java.net.SocketException: java.net.BindException: Address already in use:
connect
	at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
	at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
	at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
	at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
	at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
	at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
	at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doGetMessage(DefaultJDBCAdapter.java:260)
	at
org.apache.activemq.store.jdbc.JDBCMessageStore.getMessage(JDBCMessageStore.java:99)
	at
org.apache.activemq.store.journal.JournalMessageStore.getMessage(JournalMessageStore.java:328)
	at org.apache.activemq.broker.region.Queue.loadMessage(Queue.java:323)
	at
org.apache.activemq.broker.region.IndirectMessageReference.incrementReferenceCount(IndirectMessageReference.java:108)
	at
org.apache.activemq.filter.MessageEvaluationContext.getMessage(MessageEvaluationContext.java:54)
	at
org.apache.activemq.filter.MessageEvaluationContext.isDropped(MessageEvaluationContext.java:47)
	at
org.apache.activemq.filter.PropertyExpression.evaluate(PropertyExpression.java:151)
	at
org.apache.activemq.filter.ComparisonExpression$1.evaluate(ComparisonExpression.java:196)
	at
org.apache.activemq.filter.ComparisonExpression.matches(ComparisonExpression.java:419)
	at
org.apache.activemq.broker.region.AbstractSubscription.matches(AbstractSubscription.java:91)
	at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:162)
	at
org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:171)
	at
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:293)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:77)
	at
org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:73)
	at
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:86)
	at
org.apache.activemq.broker.AbstractConnection.processAddConsumer(AbstractConnection.java:427)
	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:295)
	at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:201)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:97)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:63)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:143)
	at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **



Last packet sent to the server was 0 ms ago.
	at com.mysql.jdbc.Connection.createNewIO(Connection.java:2621)
	at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
	at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
	at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
	at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
	at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
	at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
	at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
	at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
	... 29 more
-- 
View this message in context: http://www.nabble.com/clean-shutdown-of-message-listeners-with-activemq-4.0.1-and-spring-2.0-tf1946225.html#a5336717
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message