1 25 26 package org.objectweb.jonas.jtests.beans.relation.oou; 27 28 import org.objectweb.util.monolog.api.Logger; 29 import org.objectweb.util.monolog.api.BasicLevel; 30 import org.objectweb.jonas.common.Log; 31 32 import javax.ejb.EntityContext ; 33 import javax.ejb.CreateException ; 34 import javax.ejb.DuplicateKeyException ; 35 import javax.ejb.RemoveException ; 36 37 40 public abstract class BEC2 implements javax.ejb.EntityBean { 41 public void m1(){ 42 } 43 44 public abstract String getId(); 48 49 public abstract void setId(String id); 50 51 55 static protected Logger logger = null; 56 EntityContext ejbContext; 57 58 64 public String ejbCreate(String id) throws CreateException , DuplicateKeyException { 65 logger.log(BasicLevel.DEBUG, ""); 66 67 setId(id); 69 70 return null; 72 } 73 74 84 public void setEntityContext(EntityContext ctx) { 85 if (logger == null) 86 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 87 logger.log(BasicLevel.DEBUG, ""); 88 ejbContext = ctx; 89 } 90 91 102 public void unsetEntityContext() { 103 logger.log(BasicLevel.DEBUG, ""); 104 ejbContext = null; 105 } 106 107 108 121 public void ejbRemove() throws RemoveException { 122 logger.log(BasicLevel.DEBUG, ""); 123 } 124 125 133 public void ejbLoad() { 134 logger.log(BasicLevel.DEBUG, ""); 135 } 136 137 145 public void ejbStore() { 146 logger.log(BasicLevel.DEBUG, ""); 147 } 148 149 154 public void ejbPostCreate(String id) throws CreateException { 155 logger.log(BasicLevel.DEBUG, "id=" + id); 156 } 157 158 162 public void ejbPassivate() { 163 logger.log(BasicLevel.DEBUG, ""); 164 } 165 166 171 public void ejbActivate() { 172 logger.log(BasicLevel.DEBUG, ""); 173 } 174 175 } 176 177 | Popular Tags |