1 22 package org.jboss.ejb3; 23 24 25 import java.io.Externalizable ; 26 import java.io.IOException ; 27 import java.io.ObjectInput ; 28 import java.io.ObjectOutput ; 29 import java.lang.reflect.InvocationHandler ; 30 import org.jboss.ejb3.remoting.Proxy; 31 32 38 public abstract class LocalProxy implements InvocationHandler , Externalizable , Proxy 39 { 40 protected Container container; 41 42 public LocalProxy() 43 { 44 } 45 46 public LocalProxy(Container container) 47 { 48 this.container = container; 49 } 50 51 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException 52 { 53 String containerId = in.readUTF(); 54 this.container = Ejb3Registry.getContainer(containerId); 55 } 56 57 public void writeExternal(ObjectOutput out) throws IOException 58 { 59 out.writeUTF(container.getObjectName().getCanonicalName()); 60 } 61 62 public abstract String toString(); 63 } 64 | Popular Tags |