1 6 7 package org.jfox.ejb; 8 9 import java.lang.reflect.Method ; 10 11 import org.jfox.ejb.connector.EJBConnectorInvoker; 12 import org.jfox.ejb.connector.EJBInvocation; 13 import org.jfox.ioc.connector.ConnectorRemote; 14 import org.jfox.ioc.connector.ObjectId; 15 16 19 20 public class MDBConnectorInvoker extends EJBConnectorInvoker { 21 22 public MDBConnectorInvoker(ObjectId clientId, ConnectorRemote remote) { 23 super(clientId, remote); 24 } 25 26 protected Object doInvoke(Object proxy, Method method, Object [] args) throws Throwable { 27 if(method.getName().equals("onMessage")) { 29 EJBInvocation invocation = new EJBInvocation(getClientId(), getMethodHash(method), args); 30 return remote.invoke(invocation); 31 } 32 else { 33 throw new Exception ("invalid method call " + method.getName()); 34 } 35 36 } 37 38 public static void main(String [] args) { 39 40 } 41 } 42 | Popular Tags |