开发者

jboss war deployed listener

开发者 https://www.devze.com 2023-03-17 11:56 出处:网络
Is there a single listener one could implement to get a \"war deployed\" event? I know there is the ContextServletListener.

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

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

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 b开发者_运维知识库e aware of a hot deploy when it finishes.


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.

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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消