此内容没有您所选择的语言版本。
Chapter 17. Example: Remote 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 "Using JBoss Operations Network for Monitoring, Deploying, and Managing Resources."
Important
For security reasons, it is not possible to run a local JNDI lookup from an alert CLI script. It is possible to perform a remote JNDI lookup.
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 remote JNDI directory over JNP, then uses the
assertNotNull
method to get the JMX object. The script then prints the JMX information.