1 25 26 package org.objectweb.jonas.jtests.beans.relation.remon; 27 28 import javax.ejb.CreateException ; 29 import javax.ejb.DuplicateKeyException ; 30 import javax.ejb.EJBException ; 31 import javax.ejb.EntityContext ; 32 import javax.ejb.FinderException ; 33 import javax.ejb.RemoveException ; 34 import javax.naming.Context ; 35 import javax.naming.InitialContext ; 36 import javax.naming.NamingException ; 37 38 import org.objectweb.jonas.common.Log; 39 import org.objectweb.util.monolog.api.BasicLevel; 40 import org.objectweb.util.monolog.api.Logger; 41 42 45 public abstract class AttributeEC2 implements javax.ejb.EntityBean { 46 47 48 public abstract String getId(); 52 public abstract void setId(String id); 53 54 58 static protected Logger logger = null; 59 EntityContext ejbContext; 60 61 67 public String ejbCreate(String id) throws CreateException , DuplicateKeyException { 68 logger.log(BasicLevel.DEBUG, ""); 69 70 setId(id); 72 73 return null; 75 } 76 77 81 public void ejbPostCreate(String id) throws CreateException { 82 logger.log(BasicLevel.DEBUG, "id=" + id); 83 } 84 85 95 public void setEntityContext(EntityContext ctx) { 96 if (logger == null) 97 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 98 logger.log(BasicLevel.DEBUG, ""); 99 ejbContext = ctx; 100 } 101 102 113 public void unsetEntityContext() { 114 logger.log(BasicLevel.DEBUG, ""); 115 ejbContext = null; 116 } 117 118 131 public void ejbRemove() throws RemoveException { 132 logger.log(BasicLevel.DEBUG, ""); 133 } 134 135 143 public void ejbLoad() { 144 logger.log(BasicLevel.DEBUG, ""); 145 } 146 147 155 public void ejbStore() { 156 logger.log(BasicLevel.DEBUG, ""); 157 } 158 159 163 public void ejbPassivate() { 164 logger.log(BasicLevel.DEBUG, ""); 165 } 166 167 172 public void ejbActivate() { 173 logger.log(BasicLevel.DEBUG, ""); 174 } 175 176 } 177 | Popular Tags |