1 13 14 package org.ejbca.core.ejb; 15 16 17 import javax.ejb.EntityBean ; 18 import javax.ejb.EntityContext ; 19 20 import org.apache.log4j.Logger; 21 22 23 28 public class BaseEntityBean implements EntityBean { 29 30 31 public transient Logger log; 32 protected EntityContext ctx; 33 34 37 public BaseEntityBean() { 38 super(); 39 log = Logger.getLogger(this.getClass()); 40 } 41 42 47 public void debug(String msg) { 48 log.debug(msg); 49 } 50 51 57 public void debug(String msg, Throwable t) { 58 log.debug(msg, t); 59 } 60 61 66 public void info(String msg) { 67 log.info(msg); 68 } 69 70 76 public void info(String msg, Throwable t) { 77 log.info(msg, t); 78 } 79 80 85 public void warn(String msg) { 86 log.warn(msg); 87 } 88 89 95 public void warn(String msg, Throwable t) { 96 log.warn(msg, t); 97 } 98 99 104 public void error(String msg) { 105 log.error(msg); 106 } 107 108 114 public void error(String msg, Throwable t) { 115 log.error(msg, t); 116 } 117 118 123 public void setEntityContext(EntityContext ctx) { 124 this.ctx = ctx; 125 } 126 127 130 public void unsetEntityContext() { 131 this.ctx = null; 132 } 133 134 137 public void ejbActivate() { 138 } 140 141 144 public void ejbPassivate() { 145 } 147 148 151 public void ejbLoad() { 152 } 154 155 158 public void ejbStore() { 159 } 161 162 165 public void ejbRemove() { 166 } 168 169 173 protected ServiceLocator getLocator() { 174 return ServiceLocator.getInstance(); 175 } 176 } 177 | Popular Tags |