]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
Added noisy trace messages. These are "needed" to check how often an EJB's business...
authorRoland Haeder <roland@mxchange.org>
Sun, 17 Apr 2016 15:08:54 +0000 (17:08 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 17 Apr 2016 15:08:54 +0000 (17:08 +0200)
src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.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

index f41072ca9a9cd5040a92c72072733344cef5ffc0..8d6ce0739a21c12ed473e025a615d0741dde72ca 100644 (file)
@@ -44,6 +44,9 @@ public class PizzaContactSessionBean extends BaseDatabaseBean implements Contact
 
        @Override
        public Contact findContactById (final Long contactId) throws ContactNotFoundException {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findContactById: contactId={0} - CALLED!", contactId)); //NOI18N
+
                // The parameter must be valid
                if (null == contactId) {
                        // Throw NPE
@@ -71,6 +74,9 @@ public class PizzaContactSessionBean extends BaseDatabaseBean implements Contact
                        throw new ContactNotFoundException(contactId, ex);
                }
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findContactById: contact={0} - EXIT!", contact)); //NOI18N
+
                // Return found instance
                return contact;
        }
index 39e7334cea62c8f28f074383b37ec8a87e35a70d..2c3f9b970b2489a3bb89f9aec3d59801b0b8ac54 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jphone.phonenumbers.mobileprovider;
 
+import java.text.MessageFormat;
 import java.util.List;
 import javax.ejb.Singleton;
 import javax.ejb.Startup;
@@ -39,11 +40,20 @@ public class PizzaMobileProviderSingletonBean extends BaseDatabaseBean implement
        @Override
        @SuppressWarnings ("unchecked")
        public List<MobileProvider> allMobileProvider () {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace("allMobileProvider: CALLED!"); //NOI18N
+
                // Init query
                Query query = this.getEntityManager().createNamedQuery("AllMobileProvider", List.class); //NOI18N
 
+               // Get list
+               List<MobileProvider> list = query.getResultList();
+
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allMobileProvider: list.size()={0} - EXIT!", list.size())); //NOI18N
+
                // Return it
-               return query.getResultList();
+               return list;
        }
 
 }
index 69c0e892613bae622ecdde05aec2c1dca1da8a82..92b867d7858b11536e6fff037de8106425b52136 100644 (file)
@@ -42,6 +42,9 @@ public class PizzaAdminContactPhoneSessionBean extends BaseDatabaseBean implemen
        @Override
        @SuppressWarnings ("unchecked")
        public List<Contact> allContacts (final DialableCellphoneNumber cellPhone) {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allContacts: cellPhone={0} - CALLED!", cellPhone)); //NOI18N
+
                // The parameter should be valid
                if (null == cellPhone) {
                        // Throw NPE
@@ -70,6 +73,9 @@ public class PizzaAdminContactPhoneSessionBean extends BaseDatabaseBean implemen
                        // No results found
                }
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("allContacts: contacts={0} - EXIT!", contacts)); //NOI18N
+
                // Return list
                return contacts;
        }
index b903705472833cd2280e19b43331f0583ad64431..e1794e5532c04ce259bf0af11507b17f2857031f 100644 (file)
@@ -46,6 +46,9 @@ public class PizzaPhoneSessionBean extends BaseDatabaseBean implements PhoneSess
 
        @Override
        public DialableCellphoneNumber findCellphoneById (final Long cellphoneId) throws PhoneEntityNotFoundException {
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findCellphoneById: cellphoneId={0} - CALLED!", cellphoneId)); //NOI18N
+
                // The id number should be valid
                if (null == cellphoneId) {
                        // Throw NPE
@@ -73,6 +76,9 @@ public class PizzaPhoneSessionBean extends BaseDatabaseBean implements PhoneSess
                        throw new PhoneEntityNotFoundException(cellphoneId, ex);
                }
 
+               // Trace message
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("findCellphoneById: cellphone={0} - EXIT!", cellphone)); //NOI18N
+
                // Return found instance
                return cellphone;
        }