jmx, cruisecontrol + rmi / call method with arg

[email protected]
Newsgroups gmane.comp.java.mx4j.user
Message-ID <28766312.1920791171038380231.JavaMail.servlet@kundenserver>
re-sent with subject!

Hi Simone et all, 
With your help I was able to solve my problem :). please see my comments inlined below. 

> On Feb 9, 2007, at 10:01 AM, Simone Bordet wrote: 
> 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: 
[snip] ... 
> 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"}); 
> 
It's as you suggested. The following call works: 
myMBeanServerConnection.invoke( 
"CruiseControl Project:name=" + "projectName",  
"buildWithTarget",  
new Object[]  {"remoteTarget"},   
new String[] {String.class.getName()} 
); 

cool! many thanks 

jacques

-------------------------------------------------------------------------
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
_______________________________________________
Mx4j-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mx4j-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.