1 25 26 package org.objectweb.jonas.jtests.beans.relation.mnu; 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 120 public void ejbRemove() throws RemoveException { 121 logger.log(BasicLevel.DEBUG, ""); 122 } 123 124 132 public void ejbLoad() { 133 logger.log(BasicLevel.DEBUG, ""); 134 } 135 136 144 public void ejbStore() { 145 logger.log(BasicLevel.DEBUG, ""); 146 } 147 148 153 public void ejbPostCreate(String id) throws CreateException { 154 logger.log(BasicLevel.DEBUG, "id=" + id); 155 } 156 157 161 public void ejbPassivate() { 162 logger.log(BasicLevel.DEBUG, ""); 163 } 164 165 170 public void ejbActivate() { 171 logger.log(BasicLevel.DEBUG, ""); 172 } 173 174 } 175 176 | Popular Tags |