From f87eac06d12f307eea2d61286edb0a03ad1dfb2e Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 16 Sep 2015 12:03:01 +0200 Subject: [PATCH] =?utf8?q?Added=20EJB=20logger=20Signed-off-by:Roland=20H?= =?utf8?q?=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../jcoreee/beans/BaseFrameworkBean.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 * -- 2.39.5