1 28 29 package com.caucho.ejb.session; 30 31 import com.caucho.ejb.AbstractContext; 32 import com.caucho.ejb.AbstractEJBHome; 33 import com.caucho.ejb.AbstractServer; 34 import com.caucho.ejb.protocol.HomeSkeletonWrapper; 35 import com.caucho.util.Log; 36 37 import javax.ejb.*; 38 import java.io.ObjectStreamException ; 39 import java.io.Serializable ; 40 import java.util.logging.Logger ; 41 42 45 abstract public class StatelessHome extends AbstractEJBHome 46 implements EJBHome, EJBLocalHome, Serializable 47 { 48 protected static final Logger log = Log.open(StatelessHome.class); 49 50 protected final StatelessServer _server; 51 52 protected StatelessHome(StatelessServer server) 53 { 54 _server = server; 55 } 56 57 60 abstract public AbstractContext getContext(); 61 62 65 public StatelessServer getServer() 66 { 67 return _server; 68 } 69 70 73 public AbstractServer __caucho_getServer() 74 { 75 return _server; 76 } 77 78 81 public EJBMetaData getEJBMetaData() 82 { 83 return getServer().getEJBMetaData(); 84 } 85 86 89 public HomeHandle getHomeHandle() 90 { 91 return getServer().getHomeHandle(); 92 } 93 94 97 public Handle getHandle() 98 { 99 return getContext().getHandle(); 100 } 101 102 105 public Object getPrimaryKey() 106 { 107 return null; 108 } 109 110 113 public EJBObject getEJBObject() 114 { 115 return null; 116 } 117 118 121 public void remove(Handle handle) 122 throws RemoveException 123 { 124 getServer().remove(handle); 125 } 126 127 130 public void remove(Object primaryKey) 131 throws RemoveException 132 { 133 getServer().remove(primaryKey); 134 } 135 136 141 public Object writeReplace() throws ObjectStreamException 142 { 143 return new HomeSkeletonWrapper(getHomeHandle()); 144 } 145 146 protected SessionObject _caucho_getStatelessObject() 147 { 148 return null; 149 } 150 } 151 152 153 | Popular Tags |