FileDocCategorySizeDatePackage
EjbInvokerImpl.javaAPI DocGlassfish v2 API3898Fri May 04 22:36:10 BST 2007com.sun.enterprise.webservice

EjbInvokerImpl

public class EjbInvokerImpl extends InvokerImpl
This extends InvokerImpl - the difference is this creates a Map of methods from class to proxy class

Fields Summary
private HashMap
methodMap
private Class
endpointImplClass
Constructors Summary
public EjbInvokerImpl(Class endpointImpl, com.sun.xml.ws.api.server.Invoker core, Object inv, WebServiceContextImpl w)

    
         
                
        super(core, inv, w);
        endpointImplClass = endpointImpl;
    
Methods Summary
public java.lang.Objectinvoke(com.sun.xml.ws.api.message.Packet p, java.lang.reflect.Method m, java.lang.Object args)
Here is where we actually call the endpoint method

        if(methodMap == null) {
            methodMap = new HashMap();
            Class proxyClass = invokeObject.getClass();
            for(Method x : endpointImplClass.getMethods()) {
                try {
                    Method mappedMethod = 
                        proxyClass.getMethod(x.getName(), x.getParameterTypes());
                    methodMap.put(x, mappedMethod);
                } catch (NoSuchMethodException noex) {
                    // We do not take any action because these may be excluded @WebMethods
                    // or EJB business methods that are not @WebMethods etc
                    continue;
                }
            }            
        }
        Method mappedMethod = 
                (Method) methodMap.get(m);
        if(mappedMethod != null)
            return(super.invoke(p, mappedMethod,  args));
        throw new IllegalAccessException("Unable to find invocation method");