1 25 26 package org.objectweb.jonas.jtests.beans.secured; 27 28 import javax.ejb.CreateException ; 29 import javax.ejb.EJBContext ; 30 import javax.ejb.EntityBean ; 31 import javax.ejb.EntityContext ; 32 import javax.ejb.RemoveException ; 33 34 import org.objectweb.jonas.common.Log; 35 import org.objectweb.util.monolog.api.BasicLevel; 36 37 42 public abstract class BaseEC2 extends BaseCommon implements EntityBean { 43 44 protected EntityContext entityContext; 45 46 public abstract String getInfo(); 50 public abstract void setInfo(String n); 51 public abstract String getName(); 52 public abstract void setName(String n); 53 54 public EJBContext getEJBContext() { 55 return entityContext; 56 } 57 58 public void ejbActivate() { 59 logger.log(BasicLevel.DEBUG, ""); 60 } 61 62 public void ejbPassivate() { 63 logger.log(BasicLevel.DEBUG, ""); 64 } 65 66 public void ejbLoad() { 67 logger.log(BasicLevel.DEBUG, ""); 68 } 69 70 public void ejbStore() { 71 logger.log(BasicLevel.DEBUG, ""); 72 } 73 74 public void ejbRemove() throws RemoveException { 75 logger.log(BasicLevel.DEBUG, ""); 76 } 77 78 public void setEntityContext(EntityContext ctx) { 79 if( logger == null) 80 logger = Log.getLogger(Log.JONAS_TESTS_PREFIX); 81 logger.log(BasicLevel.DEBUG, ""); 82 entityContext = ctx; 83 84 } 85 86 public void unsetEntityContext() { 87 logger.log(BasicLevel.DEBUG, ""); 88 } 89 90 public String ejbCreate(String name, String info) throws CreateException { 91 logger.log(BasicLevel.DEBUG,""); 92 setInfo(info); 93 setName(name); 94 return(null); 95 } 96 97 public void ejbPostCreate(String name, String info){ 98 logger.log(BasicLevel.DEBUG, ""); 99 } 100 101 } 102 | Popular Tags |