此内容没有您所选择的语言版本。
5. Example: JNDI Lookups After an Alert (JBoss EAP 5)
Important
This script is intended to be run directly on the server, such as using the
-f
parameter or through a server-side alert script. This cannot be run using the interactive CLI.
For information on running server-side scripts in response to alerts, see "Setting up Monitoring, Alerts, and Operations".
The alert system can run a script in response to a fired alert. One possible response for a JBoss AS 5 server is to check the JNDI directory and look up the JMX information.
This script first connects to the JNDI directory over JNP, then uses the
assertNotNull
method to get the JMX object. The script then prints the JMX information.