1 25 26 28 package org.objectweb.jonas.jtests.beans.message; 29 30 import java.rmi.RemoteException ; 31 import javax.ejb.CreateException ; 32 import javax.ejb.DuplicateKeyException ; 33 import javax.ejb.EntityBean ; 34 import javax.ejb.EntityContext ; 35 import javax.ejb.RemoveException ; 36 37 38 import org.objectweb.jonas.common.Log; 39 import org.objectweb.util.monolog.api.Logger; 40 import org.objectweb.util.monolog.api.BasicLevel; 41 42 45 public class MRecordEC implements EntityBean { 46 47 protected static Logger logger = null; 48 EntityContext ejbContext; 49 50 public String uuid; 55 public String dest; 56 public int value; 57 public int count; 58 public String mdb; 59 60 64 74 public void setEntityContext(EntityContext ctx) { 75 if (logger == null) { 76 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 77 } 78 logger.log(BasicLevel.DEBUG, ""); 79 ejbContext = ctx; 80 } 81 82 93 public void unsetEntityContext() { 94 ejbContext = null; 95 } 96 97 110 public void ejbRemove() throws RemoveException { 111 logger.log(BasicLevel.DEBUG, ""); 112 } 113 114 122 public void ejbLoad() { 123 logger.log(BasicLevel.DEBUG, ""); 124 } 125 126 134 public void ejbStore() { 135 logger.log(BasicLevel.DEBUG, ""); 136 } 137 138 143 public void ejbPostCreate(String uuid, String dest, int value, String mdb) throws CreateException { 144 logger.log(BasicLevel.DEBUG, ""); 145 } 146 147 153 public MRecordPK ejbCreate(String uuid, String dest, int value, String mdb) throws CreateException , DuplicateKeyException { 154 logger.log(BasicLevel.DEBUG, ""); 155 this.uuid = uuid; 157 this.dest = dest; 158 this.value = value; 159 this.mdb = mdb; 160 this.count = 1; 161 162 return null; 164 } 165 166 170 public void ejbPassivate() { 171 logger.log(BasicLevel.DEBUG, ""); 172 } 173 174 179 public void ejbActivate() { 180 logger.log(BasicLevel.DEBUG, ""); 181 } 182 183 187 190 public String getUUID() throws RemoteException { 191 return uuid; 192 } 193 194 197 public String getDest() throws RemoteException { 198 return dest; 199 } 200 201 204 public int getValue() throws RemoteException { 205 return value; 206 } 207 208 211 public int getCount() throws RemoteException { 212 return count; 213 } 214 215 218 public void updateCount() throws RemoteException { 219 count++; 220 } 221 222 225 public String getMDB() throws RemoteException { 226 return mdb; 227 } 228 229 } 230 | Popular Tags |