protected Object [ ] execute ( final String hostportOrPid , final String login , final String password , final String beanname , String [ ] command , final boolean oneBeanOnly ) throws Exception { JMXConnector jmxc = connect ( hostportOrPid , login , password ) ; Object [ ] result = null ; try { MBeanServerConnection mbsc = jmxc . getMBeanServerConnection ( ) ; result = doBeans ( mbsc , getObjectName ( beanname ) , command , oneBeanOnly ) ; } finally { jmxc . close ( ) ; } return result ; }
Execute command against remote JMX agent .