jboss战争部署的监听器 [英] jboss war deployed listener

查看:184
本文介绍了jboss战争部署的监听器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以实现一个侦听器来获取战争部署"事件?

Is there a single listener one could implement to get a "war deployed" event?

我知道有 ContextServletListener . 但是每个组件(几个web.xml文件)都必须附加".

I know there is the ContextServletListener. But it has to be 'attached' for each component (several web.xml files).

作为后备,如果我使用ContextServletListener,如何知道最后一个组件已部署?

As a fallback, if I use ContextServletListener, how can I tell that the last component has been deployed?

作为旁注:完成部署后,我需要注意一个热部署.

As a side note: I need to be aware of a hot deploy when it finishes.

推荐答案

部署战争时,JBoss注册一个 J2EEApplication MBean.您可以向JBoss MBeanServer的MBeanServer委托(对象名称: JMImplementation:type = MBeanServerDelegate )注册JMX通知侦听器,该通知将在您注册和取消注册MBean时通知您.

JBoss registers a J2EEApplication MBean when a war is deployed. You can register a JMX notification listener with the JBoss MBeanServer's MBeanServer delegate (Object name: JMImplementation:type=MBeanServerDelegate) which will notify you when MBeans are registered and unregistered.

已注册通知监听器的 jboss.management.local:J2EEServer = Local,j2eeType = WebModule ** 的ObjectName过滤器将为您发送所有已部署战争的通知.

An ObjectName filter like jboss.management.local:J2EEServer=Local,j2eeType=WebModule,* for your registered notification listener will get you notifications for all deployed wars.

这将适用于JBoss 4.x和5.x.

This will work for JBoss 4.x and 5.x.

这篇关于jboss战争部署的监听器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆