1 28 29 package com.caucho.ejb.protocol; 30 31 import com.caucho.util.L10N; 32 33 import javax.ejb.EJBLocalHome ; 34 import javax.naming.Context ; 35 import javax.naming.InitialContext ; 36 import java.io.ObjectStreamException ; 37 import java.io.Serializable ; 38 39 42 public class LocalSkeletonWrapper implements Serializable { 43 static L10N L = new L10N(LocalSkeletonWrapper.class); 44 45 protected String serverId; 46 protected Object localId; 47 48 51 public LocalSkeletonWrapper() 52 { 53 } 54 55 58 public LocalSkeletonWrapper(String serverId, Object localId) 59 { 60 this.serverId = serverId; 61 this.localId = localId; 62 } 63 64 67 public Object readResolve() 68 throws ObjectStreamException 69 { 70 try { 71 Context cmp = (Context ) new InitialContext ().lookup("java:comp/env/cmp"); 72 73 EJBLocalHome home = (EJBLocalHome ) cmp.lookup(serverId); 74 75 83 throw new UnsupportedOperationException (); 84 } catch (Exception e) { 85 throw new ObjectExceptionWrapper(e); 86 } 87 } 88 } 89 90 91 | Popular Tags |