X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Fjcoreee%2Fbeans%2FBaseFrameworkBean.java;h=73d8345a658c645377bb519f875e46710e87004e;hb=f87eac06d12f307eea2d61286edb0a03ad1dfb2e;hp=0a62f6e3a356d5c61b7cfff419a6462418dbb0ff;hpb=eadf3b1db64131882abb04abe7b58acb21312303;p=jcore-utils.git diff --git a/src/org/mxchange/jcoreee/beans/BaseFrameworkBean.java b/src/org/mxchange/jcoreee/beans/BaseFrameworkBean.java index 0a62f6e..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. */ @@ -44,8 +54,8 @@ public abstract class BaseFrameworkBean implements Serializable { } /** - * Super initialization method. If you overwrite this method, please call it - * before (!) your own initialization. + * Super initialization method. If you wrie your initialization method, + * please call this method before (!) your own initialization. * * @throws RuntimeException If something unexpected happens */ @@ -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 *