首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

客户端监控联接ActiveMQ状态

2013-07-16 
客户端监控连接ActiveMQ状态1、spring配置文件中配置exceptionListenerbean idexceptionListener ref

客户端监控连接ActiveMQ状态

1、spring配置文件中配置exceptionListener

<bean id="exceptionListener" ref="connectionFactory"></property>

<property name="destination" ref="messageListenerQueue"></property>

<property name="messageListener" ref="messageListener"></property>

<property name="exceptionListener" ref="exceptionListener"></property>

</bean>

2、创建TempExceptionListener实现javax.jms.ExceptionListener接口

@Override

? ? public void onException(JMSException e) {

? ? ? ? LOG.error("TempExceptionListener 收到消息:" + e);

? ? ? ? LOG.warn("发送监控告警~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

? ? ? ??

? ? }

热点排行