1 25 26 package org.objectweb.jonas.jtests.beans.relation.dass; 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 P1EC2 implements javax.ejb.EntityBean { 46 47 48 public abstract String getId(); 52 public abstract void setId(String id); 53 public abstract String getPf1(); 54 public abstract void setPf1(String pf1); 55 56 60 static protected Logger logger = null; 61 EntityContext ejbContext; 62 63 69 public String ejbCreate(String id, String pf1) throws CreateException , DuplicateKeyException { 70 logger.log(BasicLevel.DEBUG, ""); 71 72 setId(id); 74 setPf1(pf1); 75 76 return null; 78 } 79 80 90 public void setEntityContext(EntityContext ctx) { 91 if (logger == null) 92 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 93 logger.log(BasicLevel.DEBUG, ""); 94 ejbContext = ctx; 95 } 96 97 108 public void unsetEntityContext() { 109 logger.log(BasicLevel.DEBUG, ""); 110 ejbContext = null; 111 } 112 113 126 public void ejbRemove() throws RemoveException { 127 logger.log(BasicLevel.DEBUG, ""); 128 } 129 130 138 public void ejbLoad() { 139 logger.log(BasicLevel.DEBUG, ""); 140 } 141 142 150 public void ejbStore() { 151 logger.log(BasicLevel.DEBUG, ""); 152 } 153 154 159 public void ejbPostCreate(String id, String pf1) throws CreateException { 160 logger.log(BasicLevel.DEBUG, "id=" + id); 161 } 162 163 167 public void ejbPassivate() { 168 logger.log(BasicLevel.DEBUG, ""); 169 } 170 171 176 public void ejbActivate() { 177 logger.log(BasicLevel.DEBUG, ""); 178 } 179 180 } 181 | Popular Tags |