1 22 package org.jboss.test.hello.ejb; 23 24 import javax.ejb.EJBException ; 25 import javax.ejb.EntityBean ; 26 import javax.ejb.EntityContext ; 27 import javax.ejb.CreateException ; 28 import org.jboss.logging.Logger; 29 30 34 public abstract class HelloLogBean implements EntityBean 35 { 36 private static Logger log = Logger.getLogger(HelloLogBean.class); 37 38 public HelloLogBean() 39 { 40 } 41 42 public String ejbCreate(String msg) throws CreateException 43 { 44 setHelloArg(msg); 45 log.info("ejbCreate, msg=" + msg); 46 return null; 47 } 48 49 public void ejbPostCreate(String msg) 50 { 51 } 52 53 public abstract String getHelloArg(); 54 public abstract void setHelloArg(String echoArg); 55 56 public abstract long getStartTime(); 57 public abstract void setStartTime(long startTime); 58 59 public abstract long getEndTime(); 60 public abstract void setEndTime(long endTime); 61 62 public long getElapsedTime() 63 { 64 long start = getStartTime(); 65 long end = getEndTime(); 66 return end - start; 67 } 68 69 public void setEntityContext(EntityContext ctx) throws EJBException 70 { 71 } 72 73 public void unsetEntityContext() throws EJBException 74 { 75 } 76 77 public void ejbActivate() 78 { 79 } 80 81 public void ejbPassivate() 82 { 83 } 84 85 public void ejbLoad() 86 { 87 } 88 89 public void ejbStore() 90 { 91 } 92 93 public void ejbRemove() 94 { 95 } 96 } 97 | Popular Tags |