From: Roland Häder Date: Mon, 23 May 2016 12:19:29 +0000 (+0200) Subject: debug lines cannot be the logger EJB + it *MUST* be javax.enterprise.context.SessionS... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=323b5b967738defef0828a7eed5e0354cf3c7f58;p=pizzaservice-war.git debug lines cannot be the logger EJB + it *MUST* be javax.enterprise.context.SessionScoped imported Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java index 5e7acb64..587435aa 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java @@ -19,12 +19,12 @@ package org.mxchange.pizzaapplication.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.pizzaapplication.beans.BasePizzaController; import org.mxchange.jusercore.events.login.UserLoggedInEvent; +import org.mxchange.pizzaapplication.beans.BasePizzaController; /** * A session bean for handling localization/internationalization changes. This @@ -51,7 +51,7 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements @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 PizzaLocalizationSessionBean extends BasePizzaController implements 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("PizzaLocalizationSessionBean::getLanguage(): locale.language={0} - EXIT!", this.getLocale().getLanguage())); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::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("PizzaLocalizationSessionBean::setLanguage: language={0} - CALLED!", language)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::setLanguage: language={0} - CALLED!", language)); //NOI18N // Is the language null? if (null == language) { @@ -102,25 +102,25 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements Locale loc = new Locale(splits[0], splits[1]); // Log debug message - //this.getLoggerBeanLocal().logDebug(MessageFormat.format("PizzaLocalizationSessionBean::setLanguage: loc={0}", loc)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::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("PizzaLocalizationSessionBean::setLanguage: EXIT!"); //NOI18N + //* NOISY-DEBUG: */ System.out.println("PizzaLocalizationSessionBean::setLanguage: EXIT!"); //NOI18N } @Override public Locale getLocale () { - //this.getLoggerBeanLocal().logTrace(MessageFormat.format("PizzaLocalizationSessionBean::getLocale(): locale={0} - EXIT!", this.locale)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::getLocale(): locale={0} - EXIT!", this.locale)); //NOI18N return this.locale; } @Override public void setLocale (final Locale locale) { - //this.getLoggerBeanLocal().logTrace(MessageFormat.format("PizzaLocalizationSessionBean::setLocale(): locale={0} - CALLED!", locale)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::setLocale(): locale={0} - CALLED!", locale)); //NOI18N this.locale = locale; } @@ -139,19 +139,19 @@ public class PizzaLocalizationSessionBean extends BasePizzaController implements @PostConstruct public void init () { // Log trace message - //this.getLoggerBeanLocal().logTrace("PizzaLocalizationSessionBean::init: CALLED!"); //NOI18N + //* NOISY-DEBUG: */ System.out.println("PizzaLocalizationSessionBean::init: CALLED!"); //NOI18N // Create locale instance from context Locale loc = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale(); // Log debug message - //this.getLoggerBeanLocal().logDebug(MessageFormat.format("PizzaLocalizationSessionBean::init: loc={0}", loc)); //NOI18N + //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("PizzaLocalizationSessionBean::init: loc={0}", loc)); //NOI18N // Set it here this.setLocale(loc); // Log trace message - //this.getLoggerBeanLocal().logTrace("PizzaLocalizationSessionBean::init: EXIT!"); //NOI18N + //* NOISY-DEBUG: */ System.out.println("PizzaLocalizationSessionBean::init: EXIT!"); //NOI18N } }