Originally posted by Roland Barcia:
Mostly every administrative object in WAS is a JMX MBean. The Listerer Port has an MBean as well. Some MBeans emit notifications when certain event happen. The WAS 5 Listener Port emmits j2ee.state.stopping and j2ee.state.stopped.
You can write a JMX notification Listener to be notified when these events get emitted from the Listener Port MBEan. When you receive the stop event, you can attempt to restart the Listener Port using JMX.
URL for writing event listeners:
The tool MBeanInspector is a good tool to look at the MBeans in WAS. It will tell you what attribute, operations, and events an MBean has. It will also let you invoke them and create dummy event notifications to test out certain situations: