activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Turner <steventurner...@gmail.com>
Subject Re: ExceptionListener not getting fired on the client side when using JmsTemplate
Date Tue, 29 Oct 2013 07:03:32 GMT
This is what I am doing:

public class ActiveMQAuthConnectionFactory extends 
     org.apache.activemq.ActiveMQConnectionFactory
{
private static class AMQExceptionListener implements ExceptionListener
    {
        @Override
        public void onException(JMSException exception)
        {
            LOG.info("XXX Exception is " + exception);
        }
    }

public ActiveMQAuthConnectionFactory()
{
        super();
        super.setExceptionListener(new AMQExceptionListener());
}
}

I am then using this ActiveMQAuthConnectionFactory wrapped in a
PooledConnectionFactory which is passed to JmsTemplate.

    <bean id="connectionFactory"
class="common.jms.ActiveMQAuthConnectionFactory">
        <property name="brokerURL"
value="failover://(tcp://test1.hyd:61616)" />
    </bean>

    
    <bean id="jmsConnectionFactory"
        class="org.apache.activemq.pool.PooledConnectionFactory"
        destroy-method="stop">
        <property name="connectionFactory" ref="connectionFactory" />
        <property name="maxConnections" value="5" /> 
    </bean>

Could somebody explain what I am doing wrong here?




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

Mime
View raw message