Re: jmx, cruisecontrol + rmi / call method with arg
"Simone Bordet" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 2/5/07, [email protected] <[email protected]> wrote: > Hello, > I use CruiseControl which use MX4J to publish its interface to various protocols. I have built a working CruiseControl Connector which allows me to remotely trigger tasks. > > Among the methods that can be invoked there is one which has a parameter, namely "buildWithTarget". My problem is how to correctly set the target parameter. > > My call on MBeanServerConnection via RMI > mbsc.invoke("myProject", "buildWithTarget", params, args); > always fails with the following exception: > at mx4j.server.ReflectionMBeanInvoker.invoke(ReflectionMBeanInvoker.java:61) > [cruiseConrolConnector] at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:238) > [cruiseConrolConnector] at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120) > [cruiseConrolConnector] at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:84) > [cruiseConrolConnector] at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120) > [cruiseConrolConnector] at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120) > > How do I find out what to pass as params and args? As Alper said, you should lookup documentation about the MBean you want to invoke. For example, the first parameter ("myProject") should be an ObjectName, which is of the form "domain:key=value[,key=value]" so "myProject" does not fit. 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