1 25 26 package org.objectweb.jonas.jtests.beans.relation.dass; 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 42 public abstract String getId(); 46 47 public abstract void setId(String id); 48 49 53 static protected Logger logger = null; 54 EntityContext ejbContext; 55 56 62 public String ejbCreate(String id) throws CreateException , DuplicateKeyException { 63 logger.log(BasicLevel.DEBUG, ""); 64 65 setId(id); 67 68 return null; 70 } 71 72 77 public void ejbPostCreate(String id) throws CreateException { 78 logger.log(BasicLevel.DEBUG, "id=" + id); 79 } 80 81 91 public void setEntityContext(EntityContext ctx) { 92 if (logger == null) 93 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 94 logger.log(BasicLevel.DEBUG, ""); 95 ejbContext = ctx; 96 } 97 98 109 public void unsetEntityContext() { 110 logger.log(BasicLevel.DEBUG, ""); 111 ejbContext = null; 112 } 113 114 115 128 public void ejbRemove() throws RemoveException { 129 logger.log(BasicLevel.DEBUG, ""); 130 } 131 132 140 public void ejbLoad() { 141 logger.log(BasicLevel.DEBUG, ""); 142 } 143 144 152 public void ejbStore() { 153 logger.log(BasicLevel.DEBUG, ""); 154 } 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 |