1 25 26 package org.objectweb.jonas.jtests.beans.relation.dass; 27 28 import java.util.Collection ; 29 import javax.ejb.CreateException ; 30 import javax.ejb.DuplicateKeyException ; 31 import javax.ejb.EJBException ; 32 import javax.ejb.EntityContext ; 33 import javax.ejb.FinderException ; 34 import javax.ejb.RemoveException ; 35 import javax.naming.Context ; 36 import javax.naming.InitialContext ; 37 import javax.naming.NamingException ; 38 39 import org.objectweb.jonas.common.Log; 40 import org.objectweb.util.monolog.api.BasicLevel; 41 import org.objectweb.util.monolog.api.Logger; 42 43 46 public abstract class P4EC2 implements javax.ejb.EntityBean { 47 48 49 public abstract String getId(); 53 public abstract void setId(String id); 54 public abstract String getPf4(); 55 public abstract void setPf4(String pf4); 56 57 public abstract Collection getP3(); 58 public abstract void setP3(Collection p3); 59 60 64 static protected Logger logger = null; 65 EntityContext ejbContext; 66 67 73 public String ejbCreate(String id, String pf4) throws CreateException , DuplicateKeyException { 74 logger.log(BasicLevel.DEBUG, ""); 75 76 setId(id); 78 setPf4(pf4); 79 80 return null; 82 } 83 84 89 public void ejbPostCreate(String id, String pf4) throws CreateException { 90 logger.log(BasicLevel.DEBUG, "id=" + id); 91 } 92 93 103 public void setEntityContext(EntityContext ctx) { 104 if (logger == null) 105 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 106 logger.log(BasicLevel.DEBUG, ""); 107 ejbContext = ctx; 108 } 109 110 121 public void unsetEntityContext() { 122 logger.log(BasicLevel.DEBUG, ""); 123 ejbContext = null; 124 } 125 126 139 public void ejbRemove() throws RemoveException { 140 logger.log(BasicLevel.DEBUG, ""); 141 } 142 143 151 public void ejbLoad() { 152 logger.log(BasicLevel.DEBUG, ""); 153 } 154 155 163 public void ejbStore() { 164 logger.log(BasicLevel.DEBUG, ""); 165 } 166 167 171 public void ejbPassivate() { 172 logger.log(BasicLevel.DEBUG, ""); 173 } 174 175 180 public void ejbActivate() { 181 logger.log(BasicLevel.DEBUG, ""); 182 } 183 184 } 185 | Popular Tags |