1 25 26 package org.objectweb.jonas.jtests.beans.relation.mou; 27 28 29 import org.objectweb.util.monolog.api.Logger; 30 import org.objectweb.util.monolog.api.BasicLevel; 31 import org.objectweb.jonas.common.Log; 32 33 import javax.ejb.EntityContext ; 34 import javax.ejb.CreateException ; 35 import javax.ejb.DuplicateKeyException ; 36 import javax.ejb.RemoveException ; 37 38 41 public abstract class BEC2 implements javax.ejb.EntityBean { 42 public void m1(){ 43 } 44 45 public abstract String getId(); 49 50 public abstract void setId(String id); 51 52 56 static protected Logger logger = null; 57 EntityContext ejbContext; 58 59 65 public String ejbCreate(String id) throws CreateException , DuplicateKeyException { 66 logger.log(BasicLevel.DEBUG, ""); 67 68 setId(id); 70 71 return null; 73 } 74 75 85 public void setEntityContext(EntityContext ctx) { 86 if (logger == null) 87 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 88 logger.log(BasicLevel.DEBUG, ""); 89 ejbContext = ctx; 90 } 91 92 103 public void unsetEntityContext() { 104 logger.log(BasicLevel.DEBUG, ""); 105 ejbContext = null; 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 |