JMX in Beanshell

chrismith85 <[email protected]> Thu, 30 Oct 2008 11:03:00 -0700 (PDT)
Newsgroups gmane.comp.java.beanshell.user
Message-ID <[email protected]>
I'm trying to use a Beanshell script to connect to another program via JMX.
The client code works perfectly in Java, and it even works when I create a
Beanshell interpreter in my Java program and pass it the code. But running
the code directly in Beanshell causes the connection to fail. The code in
question looks something like this:

JMXServiceURL url = new JMXServiceURL("jmxmp", host, thePort);
jmxc = JMXConnectorFactory.newJMXConnector(url, null);
jmxc.connect();

Upon execution of the connect(), this exception is thrown:

java.lang.RuntimeException: java.io.IOException:
javax.management.remote.message.HandshakeBeginMessage

Can anyone offer any assistance?

Thanks,
Chris
-- 
View this message in context: http://www.nabble.com/JMX-in-Beanshell-tp20252265p20252265.html
Sent from the BeanShell - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/