From 62a1a9f948099806bf1ea3a38f296e6ad1ee4f09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 23 May 2016 14:19:29 +0200 Subject: [PATCH] debug lines cannot be the logger EJB + it *MUST* be javax.enterprise.context.SessionScoped imported MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../AddressbookLocalizationSessionBean.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java b/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java index fd03276a..a2a66379 100644 --- a/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java @@ -19,8 +19,8 @@ package org.mxchange.addressbook.beans.localization; import java.text.MessageFormat; import java.util.Locale; import javax.annotation.PostConstruct; +import javax.enterprise.context.SessionScoped; import javax.enterprise.event.Observes; -import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import javax.inject.Named; import org.mxchange.addressbook.beans.BaseAddressbookController; @@ -51,7 +51,7 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle @Override public void afterUserLogin (@Observes final UserLoggedInEvent event) { // Trace message - //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("LandingLocalizationSessionBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N // event should not be null if (null == event) { @@ -72,19 +72,19 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle this.setLocale(event.getLoggedInUser().getUserLocale()); // Trace message - //* NOISY-DEBUG: */ System.out.println("ContactWebBean:afterUserLogin - EXIT!"); //NOI18N + //* NOISY-DEBUG: */ System.out.println("LandingLocalizationSessionBean:afterUserLogin - EXIT!"); //NOI18N } @Override public String getLanguage () { - //this.getLoggerBeanLocal().logTrace(MessageFormat.format("AddressbookLocalizationSessionBean::getLanguage(): locale.language={0} - EXIT!", this.getLocale().getLanguage())); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AddressbookLocalizationSessionBean::getLanguage(): locale.language={0} - EXIT!", this.getLocale().getLanguage())); //NOI18N return this.getLocale().getLanguage().toLowerCase(); } @Override public void setLanguage (final String language) { // Log trace message - //this.getLoggerBeanLocal().logTrace(MessageFormat.format("AddressbookLocalizationSessionBean::setLanguage: language={0} - CALLED!", language)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AddressbookLocalizationSessionBean::setLanguage: language={0} - CALLED!", language)); //NOI18N // Is the language null? if (null == language) { @@ -102,25 +102,25 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle Locale loc = new Locale(splits[0], splits[1]); // Log debug message - //this.getLoggerBeanLocal().logDebug(MessageFormat.format("AddressbookLocalizationSessionBean::setLanguage: loc={0}", loc)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AddressbookLocalizationSessionBean::setLanguage: loc={0}", loc)); //NOI18N // Set it here and in the JSF context this.setLocale(loc); FacesContext.getCurrentInstance().getViewRoot().setLocale(loc); // Log trace message - //this.getLoggerBeanLocal().logTrace("AddressbookLocalizationSessionBean::setLanguage: EXIT!"); //NOI18N + //* NOISY-DEBUG: */ System.out.println("AddressbookLocalizationSessionBean::setLanguage: EXIT!"); //NOI18N } @Override public Locale getLocale () { - //this.getLoggerBeanLocal().logTrace(MessageFormat.format("AddressbookLocalizationSessionBean::getLocale(): locale={0} - EXIT!", this.locale)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AddressbookLocalizationSessionBean::getLocale(): locale={0} - EXIT!", this.locale)); //NOI18N return this.locale; } @Override public void setLocale (final Locale locale) { - //this.getLoggerBeanLocal().logTrace(MessageFormat.format("AddressbookLocalizationSessionBean::setLocale(): locale={0} - CALLED!", locale)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AddressbookLocalizationSessionBean::setLocale(): locale={0} - CALLED!", locale)); //NOI18N this.locale = locale; } @@ -139,19 +139,19 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle @PostConstruct public void init () { // Log trace message - //this.getLoggerBeanLocal().logTrace("AddressbookLocalizationSessionBean::init: CALLED!"); //NOI18N + //* NOISY-DEBUG: */ System.out.println("AddressbookLocalizationSessionBean::init: CALLED!"); //NOI18N // Create locale instance from context Locale loc = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale(); // Log debug message - //this.getLoggerBeanLocal().logDebug(MessageFormat.format("AddressbookLocalizationSessionBean::init: loc={0}", loc)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AddressbookLocalizationSessionBean::init: loc={0}", loc)); //NOI18N // Set it here this.setLocale(loc); // Log trace message - //this.getLoggerBeanLocal().logTrace("AddressbookLocalizationSessionBean::init: EXIT!"); //NOI18N + //* NOISY-DEBUG: */ System.out.println("AddressbookLocalizationSessionBean::init: EXIT!"); //NOI18N } } -- 2.39.5