From: Roland Haeder Date: Wed, 16 Sep 2015 10:03:01 +0000 (+0200) Subject: Added EJB logger X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f87eac06d12f307eea2d61286edb0a03ad1dfb2e;p=jcore-utils.git Added EJB logger Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jcoreee/beans/BaseFrameworkBean.java b/src/org/mxchange/jcoreee/beans/BaseFrameworkBean.java index f801bb9..73d8345 100644 --- a/src/org/mxchange/jcoreee/beans/BaseFrameworkBean.java +++ b/src/org/mxchange/jcoreee/beans/BaseFrameworkBean.java @@ -18,6 +18,9 @@ package org.mxchange.jcoreee.beans; import java.io.Serializable; import java.util.ResourceBundle; +import javax.ejb.EJB; +import org.mxchange.jcoreeelogger.beans.local.logger.Log; +import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; /** * A general bean class. Do not put things in here that are not serializable. @@ -37,6 +40,13 @@ public abstract class BaseFrameworkBean implements Serializable { */ private ResourceBundle bundle; + /** + * Logger instance + */ + @EJB + @Log + private LoggerBeanLocal logger; + /** * Protected constructor, please don't add init() call here. */ @@ -54,6 +64,15 @@ public abstract class BaseFrameworkBean implements Serializable { this.bundle = ResourceBundle.getBundle("org/mxchange/localization/bundle"); } + /** + * Returns an EJB logger instance + * + * @return EBJ logger instance + */ + protected LoggerBeanLocal getLogger () { + return this.logger; + } + /** * Getter for localized message from key *