]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
Continued with logging: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Thu, 4 Aug 2016 12:36:20 +0000 (14:36 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 5 Aug 2016 18:58:15 +0000 (20:58 +0200)
- added simple class name to all log messages
- added possible missing log messages

Signed-off-by: Roland Häder <roland@haeder.net>
Signed-off-by: Roland Häder <roland@mxchange.org>
12 files changed:
src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java
src/java/org/mxchange/jcountry/data/PizzaCountrySingletonBean.java
src/java/org/mxchange/jphone/phonenumbers/mobileprovider/PizzaAdminMobileProviderSessionBean.java
src/java/org/mxchange/jphone/phonenumbers/mobileprovider/PizzaMobileProviderSingletonBean.java
src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminContactPhoneSessionBean.java
src/java/org/mxchange/jphone/phonenumbers/phone/PizzaPhoneSessionBean.java
src/java/org/mxchange/jusercore/model/email_address/PizzaEmailChangeSessionBean.java
src/java/org/mxchange/jusercore/model/login/PizzaUserLoginSessionBean.java
src/java/org/mxchange/jusercore/model/register/PizzaUserRegistrationSessionBean.java
src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkSessionBean.java
src/java/org/mxchange/pizzaapplication/mailer/model/delivery/PizzaEmailDeliveryMessageBean.java

index e8dbbd38031899d2efeae82eba1eb6dae30e3b95..0966e0052a4dac52185217ab2745fffa83a817e6 100644 (file)
@@ -50,15 +50,15 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @Override
        public Contact addContact (final Contact contact) throws ContactAlreadyAddedException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("addContact: contact={0} - CALLED!", contact));
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addContact: contact={1} - CALLED!", this.getClass().getSimpleName(), contact)); //NOI18N
 
                // Is the instance set?
                if (null == contact) {
                        // Throw NPE
-                       throw new NullPointerException("contact is null");
+                       throw new NullPointerException("contact is null"); //NOI18N
                } else if (contact.getContactId() != null) {
                        // Should be null
-                       throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} - is not null", contact.getContactId()));
+                       throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} - is not null", contact.getContactId())); //NOI18N
                }
 
                // Set created timestamp
@@ -74,7 +74,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                this.getEntityManager().flush();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("addContact: contact.contactId={0} after persisting - EXIT!", contact.getContactId()));
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addContact: contact.contactId={1} after persisting - EXIT!", this.getClass().getSimpleName(), contact.getContactId())); //NOI18N
 
                // Return it
                return contact;
@@ -83,7 +83,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @Override
        public Contact findContactByEmailAddress (final String emailAddress) throws ContactNotFoundException {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findContactByEmailAddress: emailAddress={0} - CALLED!", emailAddress)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findContactByEmailAddress: emailAddress={1} - CALLED!", this.getClass().getSimpleName(), emailAddress)); //NOI18N
 
                // The parameter must be valid
                if (null == emailAddress) {
@@ -109,14 +109,14 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                        contact = (Contact) query.getSingleResult();
 
                        // Log trace message
-                       this.getLoggerBeanLocal().logTrace(MessageFormat.format("findContactByEmailAddress: Found contact={0}", contact)); //NOI18N
+                       this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findContactByEmailAddress: Found contact={1}", this.getClass().getSimpleName(), contact)); //NOI18N
                } catch (final NoResultException ex) {
                        // No result found
                        throw new ContactNotFoundException(emailAddress, ex);
                }
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findContactByEmailAddress: contact={0} - EXIT!", contact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findContactByEmailAddress: contact={1} - EXIT!", this.getClass().getSimpleName(), contact)); //NOI18N
 
                // Return found instance
                return contact;
@@ -125,7 +125,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @Override
        public Contact findContactById (final Long contactId) throws ContactNotFoundException {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findContactById: contactId={0} - CALLED!", contactId)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findContactById: contactId={1} - CALLED!", this.getClass().getSimpleName(), contactId)); //NOI18N
 
                // The parameter must be valid
                if (null == contactId) {
@@ -151,14 +151,14 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                        contact = (Contact) query.getSingleResult();
 
                        // Log trace message
-                       this.getLoggerBeanLocal().logTrace(MessageFormat.format("findContactById: Found contact={0}", contact)); //NOI18N
+                       this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findContactById: Found contact={1}", this.getClass().getSimpleName(), contact)); //NOI18N
                } catch (final NoResultException ex) {
                        // No result found
                        throw new ContactNotFoundException(contactId, ex);
                }
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findContactById: contact={0} - EXIT!", contact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findContactById: contact={1} - EXIT!", this.getClass().getSimpleName(), contact)); //NOI18N
 
                // Return found instance
                return contact;
@@ -168,7 +168,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @SuppressWarnings ("unchecked")
        public List<Contact> getAllContacts () {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace("getAllContacts - CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getAllContacts - CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Create query instance
                Query query = this.getEntityManager().createNamedQuery("AllContacts", UserContact.class); //NOI18N
@@ -177,7 +177,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                List<Contact> contacts = query.getResultList();
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("getAllContacts: contacts.size()={0} - EXIT!", contacts.size())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getAllContacts: contacts.size()={1} - EXIT!", this.getClass().getSimpleName(), contacts.size())); //NOI18N
 
                // Return it
                return contacts;
@@ -187,7 +187,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @SuppressWarnings ("unchecked")
        public List<String> getEmailAddressList () {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace("getEmailAddressList - CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getEmailAddressList - CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Create query instance
                Query query = this.getEntityManager().createNamedQuery("AllContactEmailAddresses", String.class); //NOI18N
@@ -196,7 +196,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                List<String> emailAddresses = query.getResultList();
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("getEmailAddressList: emailAddresses.size()={0} - EXIT!", emailAddresses.size())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getEmailAddressList: emailAddresses.size()={1} - EXIT!", this.getClass().getSimpleName(), emailAddresses.size())); //NOI18N
 
                // Return it
                return emailAddresses;
@@ -205,15 +205,15 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @Override
        public boolean isEmailAddressRegistered (final String emailAddress) {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("isEmailAddressRegistered: emailAddress={0} - CALLED!", emailAddress)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: emailAddress={1} - CALLED!", this.getClass().getSimpleName(), emailAddress)); //NOI18N
 
                // The email address should be valid
                if (null == emailAddress) {
                        // Is null
-                       throw new NullPointerException("emailAddress is null");
+                       throw new NullPointerException("emailAddress is null"); //NOI18N
                } else if (emailAddress.isEmpty()) {
                        // Is empty
-                       throw new IllegalArgumentException("emailAddress is empty");
+                       throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
                }
 
                // Default is not found
@@ -224,7 +224,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                        Contact contact = this.findContactByEmailAddress(emailAddress);
 
                        // Log debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("isEmailAddressRegistered: Found contact={0} for emailAddress={1}", contact, emailAddress));
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isEmailAddressRegistered: Found contact={1} for emailAddress={2}", this.getClass().getSimpleName(), contact, emailAddress)); //NOI18N
 
                        // It is found ...
                        isFound = true;
@@ -233,7 +233,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                }
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("isEmailAddressRegistered: isFound={0} - EXIT!", isFound));
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: isFound={1} - EXIT!", this.getClass().getSimpleName(), isFound)); //NOI18N
 
                // Return status
                return isFound;
@@ -242,7 +242,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @Override
        public Contact lookupContact (final Contact contact) {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("lookupContact: contact={0} - CALLED!", contact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isContactFound: contact={1} - CALLED!", this.getClass().getSimpleName(), contact)); //NOI18N
 
                // Parameter should be valid
                if (null == contact) {
@@ -267,7 +267,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                // Is the list empty?
                if (contacts.isEmpty()) {
                        // Then abort here
-                       this.getLoggerBeanLocal().logTrace("lookupContact: No contacts registered, returning 'false' ..."); //NOI18N
+                       this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isContactFound: No contacts registered, returning NULL ...", this.getClass().getSimpleName())); //NOI18N
                        return null;
                }
 
@@ -285,7 +285,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                        // Is same contact?
                        if ((Objects.equals(contact, next)) || (ContactUtils.isSameContact(contact, next))) {
                                // Debug message
-                               this.getLoggerBeanLocal().logDebug(MessageFormat.format("lookupContact: Found same contact, id={0}", next.getContactId())); //NOI18N
+                               this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isContactFound: Found same contact: contactId={1}", this.getClass().getSimpleName(), next.getContactId())); //NOI18N
 
                                // Found it
                                foundContact = next;
@@ -294,7 +294,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("lookupContact: foundContact={0} - EXIT!", foundContact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isContactFound: foundContact={1} - EXIT!", this.getClass().getSimpleName(), foundContact)); //NOI18N
 
                // Return status
                return foundContact;
@@ -303,7 +303,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @Override
        public Contact updateContactData (final Contact contact, final boolean isCellphoneUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked) {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateContactData: contact={0},isCellphoneUnlinked={1},isLandlineUnlinked={2},isFaxUnlinked={3} - CALLED!", contact, isCellphoneUnlinked, isLandlineUnlinked, isFaxUnlinked)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: contact={1},isCellphoneUnlinked={2},isLandlineUnlinked={3},isFaxUnlinked={4} - CALLED!", this.getClass().getSimpleName(), contact, isCellphoneUnlinked, isLandlineUnlinked, isFaxUnlinked)); //NOI18N
 
                // The contact instance must be valid
                if (null == contact) {
@@ -324,7 +324,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                Contact detachedContact = this.mergeContactData(contact);
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateContactData: detachedContact={0} - EXIT!", detachedContact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: detachedContact={1} - EXIT!", this.getClass().getSimpleName(), detachedContact)); //NOI18N
 
                // Return it
                return detachedContact;
@@ -333,7 +333,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
        @Override
        public Contact updateContactData (final Contact contact) {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateContactData: contact={0} - CALLED!", contact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: contact={1} - CALLED!", this.getClass().getSimpleName(), contact)); //NOI18N
 
                // The contact instance must be valid
                if (null == contact) {
@@ -356,7 +356,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                Contact detachedContact = this.updateContactData(contact, isCellphoneUnlinked, isLandLineUnlinked, isFaxUnlinked);
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateContactData: detachedContact={0} - EXIT!", detachedContact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateContactData: detachedContact={1} - EXIT!", this.getClass().getSimpleName(), detachedContact)); //NOI18N
 
                // Return it
                return detachedContact;
index de0e24a912ecf5cba7ab62a6890d0e98f4a0831f..78f6ed71ccbc65a14f5a79b04296fde1102896f5 100644 (file)
@@ -42,6 +42,9 @@ public class PizzaCountrySingletonBean extends BasePizzaDatabaseBean implements
 
        @Override
        public Country addCountry (final Country country) throws CountryAlreadyAddedException {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addCountry: country={1} - CALLED!", this.getClass().getSimpleName(), country)); //NOI18N
+
                // Is it already there?
                if (null == country) {
                        // Throw NPE
@@ -69,6 +72,9 @@ public class PizzaCountrySingletonBean extends BasePizzaDatabaseBean implements
                // Flush it to get id number back, maybe it is directly needed?
                this.getEntityManager().flush();
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addCountry: country={1} - EXIT!", this.getClass().getSimpleName(), country)); //NOI18N
+
                // Return updated instance
                return country;
        }
@@ -76,11 +82,20 @@ public class PizzaCountrySingletonBean extends BasePizzaDatabaseBean implements
        @Override
        @SuppressWarnings ("unchecked")
        public List<Country> allCountries () {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allCountries: CALLED!", this.getClass().getSimpleName())); //NOI18N
+
                // Init query
                Query query = this.getEntityManager().createNamedQuery("AllCountries", CountryData.class); //NOI18N
 
+               // Get list
+               List<Country> countries = query.getResultList();
+
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allCountries: countries.size()={1} - EXIT!", this.getClass().getSimpleName(), countries.size())); //NOI18N
+
                // Return it
-               return query.getResultList();
+               return countries;
        }
 
        /**
index 25df8fd2b758259970ded798d977ee2d6a0d14cf..4078f54939c7d4f0fd9d4cb7ed7a9cbe0abdba1d 100644 (file)
@@ -38,7 +38,7 @@ public class PizzaAdminMobileProviderSessionBean extends BasePizzaDatabaseBean i
        @Override
        public MobileProvider addMobileProvider (final MobileProvider mobileProvider) throws MobileProviderAlreadyAddedException {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("addMobileProvider: mobileProvider={0} - CALLED!", mobileProvider)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addMobileProvider: mobileProvider={1} - CALLED!", this.getClass().getSimpleName(), mobileProvider)); //NOI18N
 
                // Is the instance valid?
                if (null == mobileProvider) {
@@ -80,7 +80,7 @@ public class PizzaAdminMobileProviderSessionBean extends BasePizzaDatabaseBean i
                this.getEntityManager().flush();
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("addMobileProvider: mobileProvider.providerId={0} - EXIT!", mobileProvider.getProviderId())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addMobileProvider: mobileProvider.providerId={1} - EXIT!", this.getClass().getSimpleName(), mobileProvider.getProviderId())); //NOI18N
 
                // Return updated
                return mobileProvider;
index 3c12ca34e879de554db25a96f03a5061a5339d5d..8bd553940b1fc5d01c4a5b14c551b4e7caa81241 100644 (file)
@@ -41,19 +41,19 @@ public class PizzaMobileProviderSingletonBean extends BasePizzaDatabaseBean impl
        @SuppressWarnings ("unchecked")
        public List<MobileProvider> allMobileProvider () {
                // Trace message
-               this.getLoggerBeanLocal().logTrace("allMobileProvider: CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allMobileProvider: CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Init query
                Query query = this.getEntityManager().createNamedQuery("AllMobileProvider", CellphoneProvider.class); //NOI18N
 
-               // Get list
-               List<MobileProvider> list = query.getResultList();
+               // Get list from it
+               List<MobileProvider> mobileProviders = query.getResultList();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allMobileProvider: list.size()={0} - EXIT!", list.size())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allMobileProvider: mobileProviders.size()={1} - EXIT!", this.getClass().getSimpleName(), mobileProviders.size())); //NOI18N
 
                // Return it
-               return list;
+               return mobileProviders;
        }
 
 }
index 258d5f7f4f80bacbda5ec598746573b1acaf9054..ac59ba9d325d27a8039a772f2a415ce0c1a5acaf 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.jphone.phonenumbers.phone;
 
 import java.text.MessageFormat;
+import java.util.LinkedList;
 import java.util.List;
 import javax.ejb.Stateless;
 import javax.persistence.NoResultException;
@@ -44,7 +45,7 @@ public class PizzaAdminContactPhoneSessionBean extends BasePizzaDatabaseBean imp
        @SuppressWarnings ("unchecked")
        public List<Contact> allContacts (final DialableCellphoneNumber cellPhone) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allContacts: cellPhone={0} - CALLED!", cellPhone)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allContacts: cellPhone={1} - CALLED!", this.getClass().getSimpleName(), cellPhone)); //NOI18N
 
                // The parameter should be valid
                if (null == cellPhone) {
@@ -59,7 +60,7 @@ public class PizzaAdminContactPhoneSessionBean extends BasePizzaDatabaseBean imp
                }
 
                // Init list instance
-               List<Contact> contacts = null;
+               List<Contact> contacts = new LinkedList<>();
 
                // Get query object from all found contact-cellphone links
                Query query = this.getEntityManager().createNamedQuery("AllContactsByCellphone", UserContact.class); //NOI18N
@@ -75,7 +76,7 @@ public class PizzaAdminContactPhoneSessionBean extends BasePizzaDatabaseBean imp
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allContacts: contacts={0} - EXIT!", contacts)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allContacts: contacts.size()={1} - EXIT!", this.getClass().getSimpleName(), contacts.size())); //NOI18N
 
                // Return list
                return contacts;
index 69df539d1309614d282dd6eed230e219180438de..7763501f354228d53b70b65030375bc251664ce9 100644 (file)
@@ -46,7 +46,7 @@ public class PizzaPhoneSessionBean extends BasePizzaDatabaseBean implements Phon
        @Override
        public DialableCellphoneNumber findCellphoneById (final Long cellphoneId) throws PhoneEntityNotFoundException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findCellphoneById: cellphoneId={0} - CALLED!", cellphoneId)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findCellphoneById: cellphoneId={1} - CALLED!", this.getClass().getSimpleName(), cellphoneId)); //NOI18N
 
                // The id number should be valid
                if (null == cellphoneId) {
@@ -76,7 +76,7 @@ public class PizzaPhoneSessionBean extends BasePizzaDatabaseBean implements Phon
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findCellphoneById: cellphone={0} - EXIT!", cellphone)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findCellphoneById: cellphone={1} - EXIT!", this.getClass().getSimpleName(), cellphone)); //NOI18N
 
                // Return found instance
                return cellphone;
index 6f6629fbc60fedf6a6aa618b859bbe056f89b491..ccf8ce9de43269d649dddeab2697b9f5c53fbfb4 100644 (file)
@@ -60,7 +60,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement
        @SuppressWarnings ("unchecked")
        public List<String> allQueuedAddresses () {
                // Trace message
-               this.getLoggerBeanLocal().logTrace("allQueuedAddressesAsList: CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allQueuedAddresses: CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Get named query
                Query query = this.getEntityManager().createNamedQuery("AllEmailAddressChanges", String.class); //NOI18N
@@ -69,7 +69,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement
                List<String> emailAddresses = query.getResultList();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allQueuedAddressesAsList: emailAddresses.size()={0} - EXIT!", emailAddresses.size())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allQueuedAddresses: emailAddresses.size()={1} - EXIT!", this.getClass().getSimpleName(), emailAddresses.size())); //NOI18N
 
                // Return it
                return emailAddresses;
@@ -78,7 +78,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement
        @Override
        public void enqueueEmailAddressForChange (final ChangeableEmailAddress emailChange, final String baseUrl) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("enqueueEmailAddressForChange: emailChange={0},baseUrl={1} - CALLED!", emailChange, baseUrl)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.enqueueEmailAddressForChange: emailChange={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), emailChange, baseUrl)); //NOI18N
 
                // Email address change should be valid
                if (null == emailChange) {
@@ -109,8 +109,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement
                this.generateSecureHash(emailChange);
 
                // Persist it
-               //this.getEntityManager().persist(emailChange);
-
+               //@TODO Fix email delivery then allow this: this.getEntityManager().persist(emailChange);
                // Init variable
                Address emailAddress;
 
@@ -126,13 +125,13 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement
                this.sendEmail("Email change", "email_change", emailAddress, emailChange.getEmailChangeUser(), baseUrl); //NOI18N
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace("enqueueEmailAddressForChange - EXIT!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.enqueueEmailAddressForChange - EXIT!", this.getClass().getSimpleName())); //NOI18N
        }
 
        @Override
        public boolean isEmailAddressEnqueued (final String emailAddress) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("isEmailAddressEnqueued: emailAddress={0} - CALLED!", emailAddress)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressEnqueued: emailAddress={1} - CALLED!", this.getClass().getSimpleName(), emailAddress)); //NOI18N
 
                // Create query instance
                Query query = this.getEntityManager().createNamedQuery("SearchEmailChangeByEmail"); //NOI18N
@@ -156,7 +155,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("isEmailAddressEnqueued: isFound={0} - EXIT!", isFound)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressEnqueued: isFound={1} - EXIT!", this.getClass().getSimpleName(), isFound)); //NOI18N
 
                // Return it
                return isFound;
@@ -165,7 +164,7 @@ public class PizzaEmailChangeSessionBean extends BasePizzaDatabaseBean implement
        @Override
        public void updateEmailAddress (final ChangeableEmailAddress emailAddress) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateEmailAddress: emailAddress={0} - CALLED!", emailAddress)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateEmailAddress: emailAddress={1} - CALLED!", this.getClass().getSimpleName(), emailAddress)); //NOI18N
 
                // Email address change should be valid
                if (null == emailAddress) {
index fe3f856e43bb95bbbf8d105eeeab8957236d73d6..c67e972aa2a48e6f25e18e9ffa7afba4f6a18874 100644 (file)
@@ -59,7 +59,7 @@ public class PizzaUserLoginSessionBean extends BasePizzaDatabaseBean implements
        @Override
        public User validateUserAccountStatus (final LoginContainer container) throws UserNotFoundException, UserStatusLockedException, UserStatusUnconfirmedException, UserPasswordMismatchException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("loginUser: container={0} - CALLED!", container)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.loginUser: container={1} - CALLED!", this.getClass().getSimpleName(), container)); //NOI18N
 
                // Check some beans
                assert(this.userBean instanceof UserSessionBeanRemote) : "this.userBean is not set"; //NOI18N
@@ -105,7 +105,7 @@ public class PizzaUserLoginSessionBean extends BasePizzaDatabaseBean implements
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("loginUser: updatedUser={0} - EXIT!", updatedUser)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.loginUser: updatedUser={1} - EXIT!", this.getClass().getSimpleName(), updatedUser)); //NOI18N
 
                // Return it
                return updatedUser;
@@ -118,7 +118,7 @@ public class PizzaUserLoginSessionBean extends BasePizzaDatabaseBean implements
         * <p>
         * @param container Container instance holding the user instance and
         * unencrypted password
-        * @param updatedUser User instance found for given user name
+        * @param updatedUser Updated user instance found for given user name
         * <p>
         * @return Whether the password matches
         */
index 3380160e52c1789d83d3da116c53f49787a4aed8..d06c528c182653619ee6ba6245c90cba2364320c 100644 (file)
@@ -56,7 +56,7 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl
        @Override
        public String generateConfirmationKey (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("generateConfirmationKey: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.generateConfirmationKey: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -84,7 +84,7 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl
                                Contact contact = (Contact) query.getSingleResult();
 
                                // Warning message
-                               this.getLoggerBeanLocal().logWarning(MessageFormat.format("generateConfirmationKey: key {0} already found: contact.contactId={1}", key, contact.getContactId())); //NOI18N
+                               this.getLoggerBeanLocal().logWarning(MessageFormat.format("{0}.generateConfirmationKey: key {1} already found: contact.contactId={2}", this.getClass().getSimpleName(), key, contact.getContactId())); //NOI18N
                        } catch (final NoResultException ex) {
                                // Not found, normal case
                                confirmationKey = key;
@@ -93,7 +93,7 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl
                }
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("generateConfirmationKey: confirmationKey={0} - EXIT!", confirmationKey)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.generateConfirmationKey: confirmationKey={1} - EXIT!", this.getClass().getSimpleName(), confirmationKey)); //NOI18N
 
                // Return it
                return confirmationKey;
@@ -102,7 +102,7 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl
        @Override
        public boolean isEmailAddressRegistered (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("isEmailAddressRegistered: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // Check bean
                assert(this.userBean instanceof UserSessionBeanRemote) : "this.userBean is not set"; //NOI18N
@@ -120,7 +120,7 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl
        @Override
        public boolean isUserNameRegistered (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("isUserNameRegistered: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // Check bean
                assert(this.userBean instanceof UserSessionBeanRemote) : "this.userBean is not set"; //NOI18N
@@ -138,7 +138,7 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl
        @Override
        public User registerUser (final User user, final String baseUrl) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("registerUser: user={0},baseUrl={1} - CALLED!", user, baseUrl)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.registerUser: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -183,7 +183,7 @@ public class PizzaUserRegistrationSessionBean extends BasePizzaDatabaseBean impl
                this.sendEmail("Registration", "registration", emailAddress, addedUser, baseUrl); //NOI18N
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("registerUser: addedUser={0},addedUser.userId={1} - EXIT!", addedUser, addedUser.getUserId())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.registerUser: addedUser={1},addedUser.userId={2} - EXIT!", this.getClass().getSimpleName(), addedUser, addedUser.getUserId())); //NOI18N
 
                // Return it
                return addedUser;
index 92ab7e59db0cccf8accd1e4f4dca8580af8ec43c..ecb10ede5bc1f5cfa872a1a7da3b6981d731c33a 100644 (file)
@@ -73,7 +73,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public User addUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("addUser: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addUser: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // userId should not be null
                if (null == user) {
@@ -110,7 +110,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                this.getEntityManager().flush();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("addUser: user={0},user.userId={1} - EXIT!", user, user.getUserId())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.addUser: user={1},user.userId={2} - EXIT!", this.getClass().getSimpleName(), user, user.getUserId())); //NOI18N
 
                // Return it
                return user;
@@ -120,7 +120,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @SuppressWarnings ("unchecked")
        public List<User> allMemberPublicVisibleUsers () {
                // Trace message
-               this.getLoggerBeanLocal().logTrace("allMemberPublicVisibleUsers: CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allMemberPublicVisibleUsers: CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Get named query
                Query query = this.getEntityManager().createNamedQuery("AllMemberPublicUsers", LoginUser.class); //NOI18N
@@ -134,7 +134,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                List<User> users = query.getResultList();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allMemberPublicVisibleUsers: users.size()={0} - EXIT!", users.size())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allMemberPublicVisibleUsers: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N
 
                // Return full list
                return users;
@@ -144,7 +144,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @SuppressWarnings ("unchecked")
        public List<User> allPublicUsers () {
                // Trace message
-               this.getLoggerBeanLocal().logTrace("allPublicUsers: CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allPublicUsers: CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Get named query
                Query query = this.getEntityManager().createNamedQuery("AllPublicUsers", LoginUser.class); //NOI18N
@@ -157,7 +157,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                List<User> users = query.getResultList();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allPublicUsers: users.size()={0} - EXIT!", users.size())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allPublicUsers: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N
 
                // Return full list
                return users;
@@ -167,7 +167,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @SuppressWarnings ("unchecked")
        public List<User> allUsers () {
                // Trace message
-               this.getLoggerBeanLocal().logTrace("allUsers: CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allUsers: CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Get named query
                Query query = this.getEntityManager().createNamedQuery("AllUsers", LoginUser.class); //NOI18N
@@ -176,7 +176,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                List<User> users = query.getResultList();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allUsers: users.size()={0} - EXIT!", users.size())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allUsers: users.size()={1} - EXIT!", this.getClass().getSimpleName(), users.size())); //NOI18N
 
                // Return full list
                return users;
@@ -185,7 +185,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public User confirmAccount (final User user, final String baseUrl) throws UserStatusConfirmedException, UserStatusLockedException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("confirmAccount: user={0},baseUrl={1} - CALLED!", user, baseUrl)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: user={1},baseUrl={2} - CALLED!", this.getClass().getSimpleName(), user, baseUrl)); //NOI18N
 
                // Parameter must be valid
                if (null == user) {
@@ -231,7 +231,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                this.sendEmail("Account confirmed", "account_confirmed", emailAddress, updatedUser, baseUrl); //NOI18N
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("confirmAccount: updatedUser={0} - EXIT!", updatedUser)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.confirmAccount: updatedUser={1} - EXIT!", this.getClass().getSimpleName(), updatedUser)); //NOI18N
 
                // Return updated instance
                return updatedUser;
@@ -240,7 +240,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public User fillUserData (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("fillUserData: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fillUserData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -267,7 +267,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("fillUserData: foundUser={0} - EXIT!", foundUser)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fillUserData: foundUser={1} - EXIT!", this.getClass().getSimpleName(), foundUser)); //NOI18N
 
                // Return prepared instance
                return foundUser;
@@ -276,7 +276,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public User findUserById (final Long userId) throws UserNotFoundException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findUserById: userId={0} - CALLED!", userId)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findUserById: userId={1} - CALLED!", this.getClass().getSimpleName(), userId)); //NOI18N
 
                // Is the parameter valid?
                if (null == userId) {
@@ -300,7 +300,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                User user = (User) query.getSingleResult();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findUserById: user={0} - EXIT!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findUserById: user={1} - EXIT!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // Return found user
                return user;
@@ -309,7 +309,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public String generateRandomUserName () {
                // Trace message
-               this.getLoggerBeanLocal().logTrace("generateRandomUserName - CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.generateRandomUserName - CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Get full list
                List<String> userList = this.getUserNameList();
@@ -324,7 +324,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("generateRandomUserName: userName={0} - EXIT!", userName)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.generateRandomUserName: userName={1} - EXIT!", this.getClass().getSimpleName(), userName)); //NOI18N
 
                // Found one, so return it
                return userName;
@@ -333,12 +333,18 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        @SuppressWarnings ("unchecked")
        public List<String> getEmailAddressList () {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getEmailAddressList: CALLED!", this.getClass().getSimpleName())); //NOI18N
+
                // Get query
                Query query = this.getEntityManager().createNamedQuery("AllEmailAddresses", String.class); //NOI18N
 
                // Get result list
                List<String> emailAddressList = query.getResultList();
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getEmailAddressList: emailAddressList.size()={1} - EXIT!", this.getClass().getSimpleName(), emailAddressList.size())); //NOI18N
+
                // Return it
                return emailAddressList;
        }
@@ -346,12 +352,18 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        @SuppressWarnings ("unchecked")
        public List<String> getUserNameList () {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getUserNameList: CALLED!", this.getClass().getSimpleName())); //NOI18N
+
                // Get query
                Query query = this.getEntityManager().createNamedQuery("AllUserNames", String.class); //NOI18N
 
                // Get result list
                List<String> userNameList = query.getResultList();
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.getUserNameList: userNameList.size()={1} - EXIT!", this.getClass().getSimpleName(), userNameList.size())); //NOI18N
+
                // Return it
                return userNameList;
        }
@@ -359,7 +371,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public boolean ifUserExists (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("ifUserExists: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserExists: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // userId should not be null
                if (null == user) {
@@ -400,7 +412,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("ifUserExists: Found user {0} - EXIT!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserExists: Found user {1} - EXIT!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // Found it
                return true;
@@ -409,7 +421,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public boolean ifUserIdExists (final Long userId) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("ifUserIdExists: userId={0} - CALLED!", userId)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserIdExists: userId={1} - CALLED!", this.getClass().getSimpleName(), userId)); //NOI18N
 
                // userId should not be null
                if (null == userId) {
@@ -431,10 +443,10 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                        User dummy = (User) query.getSingleResult();
 
                        // Debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("ifUserIdExists: dummy.userId={0} found.", dummy.getUserId())); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserIdExists: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
                } catch (final NoResultException ex) {
                        // Log it
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("ifUserIdExists: getSingleResult() returned no result: {0}", ex)); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserIdExists: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
 
                        // User name does not exist
                        return false;
@@ -447,7 +459,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("ifUserIdExists: Found user id {0} - EXIT!", userId)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserIdExists: Found userId={1} - EXIT!", this.getClass().getSimpleName(), userId)); //NOI18N
 
                // Found it
                return true;
@@ -456,7 +468,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public boolean ifUserNameExists (final String userName) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("ifUserNameExists: userName={0} - CALLED!", userName)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserNameExists: userName={1} - CALLED!", this.getClass().getSimpleName(), userName)); //NOI18N
 
                // userId should not be null
                if (null == userName) {
@@ -478,17 +490,17 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                        User dummy = (User) query.getSingleResult();
 
                        // Debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("ifUserNameExists: dummy.userId={0} found.", dummy.getUserId())); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserNameExists: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
                } catch (final NoResultException ex) {
                        // Log it
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("ifUserNameExists: getSingleResult() returned no result: {0}", ex)); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.ifUserNameExists: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
 
                        // User name does not exist
                        return false;
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("ifUserNameExists: Found user name {0} - EXIT!", userName)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.ifUserNameExists: Found userName={1} - EXIT!", this.getClass().getSimpleName(), userName)); //NOI18N
 
                // Found it
                return true;
@@ -497,7 +509,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public boolean isEmailAddressRegistered (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("isEmailAddressRegistered: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -516,10 +528,10 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                        User dummy = (User) query.getSingleResult();
 
                        // Debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("isEmailAddressRegistered: dummy.userId={0} found.", dummy.getUserId())); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isEmailAddressRegistered: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
                } catch (final NoResultException ex) {
                        // Log it
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("isEmailAddressRegistered: getSingleResult() returned no result: {0}", ex)); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isEmailAddressRegistered: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
 
                        // Email address does not exist
                        return false;
@@ -531,6 +543,9 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                        throw ex;
                }
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isEmailAddressRegistered: Returning true ... - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
                // Found it
                return true;
        }
@@ -538,7 +553,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public boolean isUserNameRegistered (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("isUserNameRegistered: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -557,10 +572,10 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                        User dummy = (User) query.getSingleResult();
 
                        // Debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserNameRegistered: dummy.userId={0} found.", dummy.getUserId())); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isUserNameRegistered: dummy.userId={1} found.", this.getClass().getSimpleName(), dummy.getUserId())); //NOI18N
                } catch (final NoResultException ex) {
                        // Log it
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserNameRegistered: getSingleResult() returned no result: {0}", ex)); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isUserNameRegistered: getSingleResult() returned no result: {1}", this.getClass().getSimpleName(), ex)); //NOI18N
 
                        // User name does not exist
                        return false;
@@ -572,6 +587,9 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                        throw ex;
                }
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isUserNameRegistered: Returning true ... - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
                // Found it
                return true;
        }
@@ -579,7 +597,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public User linkUser (final User user) throws UserNameAlreadyRegisteredException, EmailAddressAlreadyRegisteredException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("linkUser: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkUser: user={0} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -621,7 +639,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                this.getEntityManager().flush();
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("linkUser: user={0} - EXIT!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkUser: user={1} - EXIT!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // Return updated instanc
                return user;
@@ -630,7 +648,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public User updateUserData (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateUserData: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -671,6 +689,9 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                // Set as updated
                detachedUser.setUserUpdated(new GregorianCalendar());
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserData: detachedUser={1} - CALLED!", this.getClass().getSimpleName(), detachedUser)); //NOI18N
+
                // Return updated instance
                return detachedUser;
        }
@@ -678,7 +699,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public PasswordHistory updateUserPassword (final User user) throws UserNotFoundException, UserStatusUnconfirmedException, UserStatusLockedException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateUserPassword: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -714,7 +735,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                this.getEntityManager().flush();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateUserPassword: entry.userPasswordHistoryId={0} - EXIT!", entry.getUserPasswordHistoryId())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPassword: entry.userPasswordHistoryId={1} - EXIT!", this.getClass().getSimpleName(), entry.getUserPasswordHistoryId())); //NOI18N
 
                // Return it
                return entry;
@@ -723,7 +744,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
        @Override
        public User updateUserPersonalData (final User user) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("updateUserPersonalData: user={0} - CALLED!", user)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: user={1} - CALLED!", this.getClass().getSimpleName(), user)); //NOI18N
 
                // user should not be null
                if (null == user) {
@@ -864,6 +885,9 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                        detachedContact.setContactLandLineNumber(detachedLandLine);
                }
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateUserPersonalData: entry.detachedUser={1} - EXIT!", this.getClass().getSimpleName(), detachedUser)); //NOI18N
+
                // Return updated user instance
                return detachedUser;
        }
index 3a44db6183a0d8ba226d147473e3937e5d2fba77..870645a4a8aa44c9a8e1b88cb06c40846531f7f4 100644 (file)
@@ -43,7 +43,7 @@ public class PizzaResendLinkSessionBean extends BasePizzaDatabaseBean implements
        @Override
        public void resendConfirmationLink (final User user, final Locale locale, final String baseUrl) {
                // Log trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("resendConfirmationLink: user={0},locale={1},baseUrl={2} - CALLED!", user, locale, baseUrl)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.resendConfirmationLink: user={1},locale={2},baseUrl={3} - CALLED!", this.getClass().getSimpleName(), user, locale, baseUrl)); //NOI18N
 
                // The user instance should be valid
                if (null == user) {
@@ -84,7 +84,7 @@ public class PizzaResendLinkSessionBean extends BasePizzaDatabaseBean implements
                this.sendEmail("Resend confirmation link", "resend_confirmation_link", emailAddress, user, baseUrl); //NOI18N
 
                // Log trace message
-               this.getLoggerBeanLocal().logTrace("resendConfirmationLink: EXIT!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.resendConfirmationLink: EXIT!", this.getClass().getSimpleName())); //NOI18N
        }
 
 }
index 11932b6874ad0f9226f1903f937f369e5317d3a5..bbd231d1e4ca8e9e4194476bec0c1aefc2b91179 100644 (file)
@@ -81,13 +81,13 @@ public class PizzaEmailDeliveryMessageBean extends BasePizzaDatabaseBean impleme
        @PostConstruct
        public void init () {
                // Trace message
-               this.getLoggerBeanLocal().logTrace("init: CALLED!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.init: CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Try to load bundle
                ResourceBundle bundle = ResourceBundle.getBundle(this.configFile);
 
                // Debug message
-               this.getLoggerBeanLocal().logDebug(MessageFormat.format("init: bundle={0}", bundle)); //NOI18N
+               this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.init: bundle={1}", this.getClass().getSimpleName(), bundle)); //NOI18N
 
                // The bunble should be valid
                if (null == bundle) {
@@ -103,7 +103,7 @@ public class PizzaEmailDeliveryMessageBean extends BasePizzaDatabaseBean impleme
                        // Loop through all
                        for (final String key : bundle.keySet()) {
                                // Log debug message
-                               this.getLoggerBeanLocal().logDebug(MessageFormat.format("init: key={0}", key)); //NOI18N
+                               this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.init: key={1}", this.getClass().getSimpleName(), key)); //NOI18N
 
                                // Get string from bundle and set it in properties
                                properties.put(key, bundle.getString(key));
@@ -114,13 +114,13 @@ public class PizzaEmailDeliveryMessageBean extends BasePizzaDatabaseBean impleme
                this.mailer.init(properties);
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace("init: EXIT!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.init: EXIT!", this.getClass().getSimpleName())); //NOI18N
        }
 
        @Override
        public void onMessage (final Message message) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("onMessage: message={0} - CALLED!", message)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.onMessage: message={1} - CALLED!", this.getClass().getSimpleName(), message)); //NOI18N
 
                // The parameter should be valid
                if (null == message) {
@@ -147,7 +147,7 @@ public class PizzaEmailDeliveryMessageBean extends BasePizzaDatabaseBean impleme
                }
 
                // Debug message
-               this.getLoggerBeanLocal().logDebug(MessageFormat.format("onMessage: serializable={0}", serializable)); //NOI18N
+               this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.onMessage: serializable={1}", this.getClass().getSimpleName(), serializable)); //NOI18N
 
                // Okay, is it the right interface?
                if (null == serializable) {
@@ -192,6 +192,6 @@ public class PizzaEmailDeliveryMessageBean extends BasePizzaDatabaseBean impleme
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace("onMessage - EXIT!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.onMessage - EXIT!", this.getClass().getSimpleName())); //NOI18N
        }
 }