1 package org.jboss.test.cts.ejb; 2 3 import javax.ejb.CreateException ; 4 import javax.ejb.CreateException ; 5 import javax.ejb.EntityBean ; 6 import javax.ejb.EntityContext ; 7 8 import org.jboss.logging.Logger; 9 10 14 public abstract class CtsCmp2Bean implements EntityBean 15 { 16 private static String VERSION = "CtsCmp2BeanV2"; 17 private static Logger log = Logger.getLogger(CtsCmp2Bean.class); 18 private EntityContext ctx; 19 20 public String ejbCreate(String key, String data) 21 throws CreateException 22 { 23 log.debug("ejbCreate '" + key + "' "+ data+", version="+VERSION); 24 setKey(key); 25 setData(data); 26 return null; 27 } 28 29 public void ejbPostCreate(String key, String data) 30 { 31 log.debug("ejbPostCreate'" + key + "' "+ data); 32 } 33 34 public abstract String getKey(); 36 public abstract void setKey(String param); 37 public abstract String getData(); 38 public abstract void setData(String param); 39 public abstract String getMoreData(); 40 public abstract void setMoreData(String param); 41 42 public void ejbLoad () 44 { 45 log.debug("ejbLoad () called"); 46 47 } 48 49 public void ejbStore () 50 { 51 log.debug("ejbStore () called"); 52 } 53 54 public void ejbRemove () 55 { 56 log.debug("ejbRemove () called"); 57 } 58 59 public void ejbActivate () 60 { 61 log.debug("ejbActivate () called"); 62 } 63 64 public void ejbPassivate () 65 { 66 log.debug("ejbPassivate () called"); 67 } 68 69 public void setEntityContext (EntityContext ctx) 70 { 71 log.debug("setEntityContext () called"); 72 this.ctx = ctx; 73 } 74 75 public void unsetEntityContext () 76 { 77 log.debug("unsetEntityContext () called"); 78 ctx = null; 79 } 80 } 81 | Popular Tags |