1 17 18 package org.apache.geronimo.console.util; 19 20 import javax.management.ObjectName ; 21 22 import org.apache.geronimo.kernel.Kernel; 23 import org.apache.geronimo.kernel.KernelRegistry; 24 import org.apache.geronimo.gbean.AbstractName; 25 26 public class KernelHelper { 27 28 protected static Kernel kernel = KernelRegistry.getSingleKernel(); 29 30 protected static Object invoke(AbstractName mBeanName, String function) 31 throws Exception { 32 Object [] NO_ARGS = new Object [0]; 33 String [] NO_PARAMS = new String [0]; 34 return invoke(mBeanName, function, NO_ARGS, NO_PARAMS); 35 } 36 37 protected static Object invoke(AbstractName mBeanName, String function, 38 Object [] args, String [] types) throws Exception { 39 Object ret = null; 40 ret = kernel.invoke(mBeanName, function, args, types); 41 return ret; 42 } 43 } 44 | Popular Tags |