]> git.mxchange.org Git - jcoreee.git/commitdiff
Added EJB logger
authorRoland Haeder <roland@mxchange.org>
Wed, 16 Sep 2015 10:03:01 +0000 (12:03 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 16 Sep 2015 10:03:01 +0000 (12:03 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcoreee/beans/BaseFrameworkBean.java

index f801bb9d141539649340cb101b4b81cbf333d482..73d8345a658c645377bb519f875e46710e87004e 100644 (file)
@@ -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
         *