package org.huihoo.jfox.mx;
import java.util.Properties;
import org.jfox.ejb.StatefulInvokerChain;
import org.jfox.ejb.plugin.Invoker;
import org.jfox.mx.Mxable;
public class StatefulInvokerChainMX implements Mxable {
private StatefulInvokerChain chain = StatefulInvokerChain.getInstance();
public void mx_addInvoker(String invokerClass){
try {
Object obj = Thread.currentThread().getContextClassLoader().loadClass(invokerClass).newInstance();
chain.addInvoker((Invoker)obj);
}
catch(Exception e){
e.printStackTrace();
}
}
public void mx_removeInvoker(String invokerClass){
chain.removeInvoker(invokerClass);
}
public String[] mx_listInvokers(){
return chain.listInvokers();
}
public Properties getOperationDescriptions() {
return null;
}
public Object getSource() {
return chain;
}
public String getMxDescription() {
return "manage the invoker chain of the stateful ejb";
}
public static void main(String[] args) {
}
}