Re: jmx, cruisecontrol + rmi / call method with arg
"Simone Bordet" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
> I have been able to call getOperations() which yielded an operation with the name "buildWithTarget" was able to call getSignature() on the operation which yields the MBeanParameterInfo[]. The results:
>
> [cruiseConrolConnector] operationInfo.getDescription().toString() buildWithTarget
> [cruiseConrolConnector] paramInfo.getName() param1
> [cruiseConrolConnector] paramInfo.getType() java.lang.String
> [cruiseConrolConnector] paramInfo.getClass() class javax.management.MBeanParameterInfo
> [cruiseConrolConnector] paramInfo.getDescription() Operation's parameter n. 1
>
> However when calling invoke The stacktrace says:
> Operation buildWithTarget does not belong to the management interface
>
> Does that mean that buildWithTarget is not implemented for RMI?
No, it usually means that the operation has been invoked with the
wrong number of arguments.
I'd guess you should invoke it like this:
ObjectName targetObjectName = ...;
mbeanServerConnection.invoke(targetObjectName, "buildWithTarget", new
String[] {String.class.getName()}, new Object[] {"myTarget"});
You have to know the ObjectName of the MBean (which you probably
already know) and the name of the target ("myTarget").
Simon
--
http://bordet.blogspot.com
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642