1 23 24 package com.sun.ejb.containers; 25 26 import java.io.IOException ; 27 import java.lang.reflect.InvocationHandler ; 28 import java.lang.reflect.Method ; 29 30 import com.sun.ejb.containers.EJBLocalObjectImpl.SerializableLocalObject; 31 import com.sun.ejb.spi.io.IndirectlySerializable; 32 import com.sun.ejb.spi.io.SerializableObjectFactory; 33 import com.sun.enterprise.Switch; 34 35 46 public class EJBObjectInvocationHandlerDelegate 47 implements InvocationHandler { 48 49 private Class remoteBusinessIntfClass; 50 private EJBObjectInvocationHandler delegate; 51 52 EJBObjectInvocationHandlerDelegate(Class intfClass, 53 EJBObjectInvocationHandler delegate) { 54 this.remoteBusinessIntfClass = intfClass; 55 this.delegate = delegate; 56 } 57 58 public Object invoke(Object proxy, Method method, Object [] args) 59 throws Throwable { 60 61 Class methodClass = method.getDeclaringClass(); 62 Object result = null; 63 if( methodClass == java.lang.Object .class ) { 64 result = InvocationHandlerUtil.invokeJavaObjectMethod 65 (this, method, args); 66 } else { 67 result = delegate.invoke(remoteBusinessIntfClass, method, args); 68 } 69 70 return result; 71 } 72 73 74 75 } 76 | Popular Tags |