1 25 26 package org.objectweb.jonas.jtests.beans.ebasic; 27 28 import javax.ejb.CreateException ; 29 import javax.ejb.DuplicateKeyException ; 30 import javax.ejb.EntityBean ; 31 import javax.ejb.EntityContext ; 32 import javax.ejb.RemoveException ; 33 34 import org.objectweb.jonas.common.Log; 35 import org.objectweb.util.monolog.api.BasicLevel; 36 import org.objectweb.util.monolog.api.Logger; 37 38 44 public abstract class AccountEC2 implements EntityBean { 45 46 static protected Logger logger = null; 47 EntityContext ejbContext; 48 49 public abstract Integer getNumber(); 53 public abstract void setNumber(Integer numtest); 54 55 public abstract String getCustomer(); 56 public abstract void setCustomer(String customer); 57 58 62 72 public void setEntityContext(EntityContext ctx) { 73 if (logger == null) 74 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 75 logger.log(BasicLevel.DEBUG, ""); 76 ejbContext = ctx; 77 } 78 79 90 public void unsetEntityContext() { 91 logger.log(BasicLevel.DEBUG, ""); 92 ejbContext = null; 93 } 94 95 108 public void ejbRemove() throws RemoveException { 109 logger.log(BasicLevel.DEBUG, ""); 110 } 111 112 120 public void ejbLoad() { 121 logger.log(BasicLevel.DEBUG, ""); 122 } 123 124 132 public void ejbStore() { 133 logger.log(BasicLevel.DEBUG, ""); 134 } 135 136 142 public java.lang.Integer ejbCreate(int num, String s) throws CreateException , DuplicateKeyException { 143 logger.log(BasicLevel.DEBUG, ""); 144 145 setNumber(new Integer (num)); 147 setCustomer(new String (s)); 148 149 return null; 151 } 152 153 158 public void ejbPostCreate(int num, String s) throws CreateException { 159 logger.log(BasicLevel.DEBUG, ""); 160 } 161 162 166 public void ejbPassivate() { 167 logger.log(BasicLevel.DEBUG, ""); 168 } 169 170 175 public void ejbActivate() { 176 logger.log(BasicLevel.DEBUG, ""); 177 } 178 179 183 186 public int getNumberPrimitive() { 187 logger.log(BasicLevel.DEBUG, ""); 188 return getNumber().intValue(); 189 } 190 191 } 192 | Popular Tags |