1 4 package org.objectweb.jonas.jtests.beans.time; 5 6 import java.util.Date ; 7 8 import javax.ejb.CreateException ; 9 import javax.ejb.SessionBean ; 10 import javax.ejb.SessionContext ; 11 12 import org.objectweb.jonas.common.Log; 13 import org.objectweb.util.monolog.api.BasicLevel; 14 import org.objectweb.util.monolog.api.Logger; 15 16 19 public class TimeBeanSLR implements SessionBean { 20 21 static private Logger logger = null; 22 SessionContext ejbContext; 23 24 28 29 public void setSessionContext(SessionContext ctx) { 30 if (logger == null) { 31 logger = Log.getLogger("org.objectweb.jonas_tests"); 32 } 33 logger.log(BasicLevel.DEBUG, ""); 34 ejbContext = ctx; 35 } 36 37 38 public void ejbRemove() { 39 logger.log(BasicLevel.DEBUG, ""); 40 } 41 42 43 public void ejbCreate() throws CreateException { 44 logger.log(BasicLevel.DEBUG, ""); 45 } 46 47 public void ejbPassivate() { 48 logger.log(BasicLevel.DEBUG, ""); 49 } 50 51 public void ejbActivate() { 52 logger.log(BasicLevel.DEBUG, ""); 53 } 54 55 59 public long getDateAsLong() { 60 logger.log(BasicLevel.DEBUG, ""); 61 return new Date ().getTime(); 62 } 63 64 public Date getDate() { 65 logger.log(BasicLevel.DEBUG, ""); 66 return new Date (); 67 } 68 69 public boolean isHandlerInitRequestInvoked() { 70 logger.log(BasicLevel.DEBUG, ""); 71 StaticPassValue spv = StaticPassValue.getInstance(); 72 String init = spv.getInit(); 73 String req = spv.getRequest(); 74 return (init != null && req != null); 75 } 76 } 77 78 | Popular Tags |