activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Turner <steventurner...@gmail.com>
Subject ExceptionListener not getting fired on the client side when using JmsTemplate
Date Tue, 29 Oct 2013 06:58:10 GMT
Hi, 

I have a custom plugin on the broker side which throws an exception in some
cases from addConnection. I would like to handle this exception on the
client side. My client uses JmsTemplate for sending messages. I am using
ActiveMQConnectionFactory.setExceptionListener to set a listener but this is
never getting invoked. 

I am not sure why the exception listener is not getting invoked here.

org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is javax.jms.JMSException:
common.jms.ActiveMQAuth$ActiveMQAuthException: Could not establish server
context
        at
org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:260)
        at
org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:172)
        at
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:441)
        at
org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:485)
        at common.jms.test.JMSProducer.start(JMSProducer.java:228)
        at common.jms.test.JMSProducer.access$900(JMSProducer.java:45)
        at common.jms.test.JMSProducer$1.run(JMSProducer.java:302)
        at java.lang.Thread.run(Thread.java:724)
Caused by: javax.jms.JMSException:
common.jms.ActiveMQAuth$ActiveMQAuthException: Could not establish server
context
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1391)
        at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1496)
        at
org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:325)
        at
org.apache.activemq.pool.ConnectionPool$2.makeObject(ConnectionPool.java:105)
        at
org.apache.activemq.pool.ConnectionPool$2.makeObject(ConnectionPool.java:90)
        at
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
        at
org.apache.activemq.pool.ConnectionPool.createSession(ConnectionPool.java:142)
        at
org.apache.activemq.pool.PooledConnection.createSession(PooledConnection.java:174)
        at
org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:200)
        at
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:429)
        ... 5 more
Caused by: java.lang.Throwable:
common.jms.ActiveMQAuth$ActiveMQAuthException: Could not establish server
context
        at
common.jms.ActiveMQAuth.establishServerContext(ActiveMQAuth.java:498)
        at
common.jms.ActiveMQAuthPlugin.addConnection(ActiveMQAuthPlugin.java:141)
        at
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:91)
        at
org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:766)
        at
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79)
        at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)
        at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:329)
        at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:184)
        at
org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
        at
org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:288)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)


Could the ActiveMQ gods please shed some light on this and help me out?

-Steve.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ExceptionListener-not-getting-fired-on-the-client-side-when-using-JmsTemplate-tp4673285.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message