From: Roland Haeder Date: Tue, 13 Oct 2015 10:33:55 +0000 (+0200) Subject: added logger messages X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=90c84d73c744c7a5e682906013fd28939145c813;p=addressbook-mailer-ejb.git added logger messages Signed-off-by:Roland Häder --- diff --git a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java index b79f78b..f75aeb3 100644 --- a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java +++ b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java @@ -111,6 +111,9 @@ public class AddressbookSessionBean extends BaseDatabaseBean implements Addressb @Override public boolean isAddressbookIdUsed (final Long addressbookId) { + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("isAddressbookIdUsed: addressbookId={0} - CALLED!", addressbookId)); //NOI18N + // Is it null or zero? if (null == addressbookId) { // Throw NPE @@ -134,6 +137,9 @@ public class AddressbookSessionBean extends BaseDatabaseBean implements Addressb // Get single result Addressbook addressbook = (Addressbook) query.getSingleResult(); + // Debug message + this.getLoggerBeanLocal().logDebug(MessageFormat.format("isAddressbookIdUsed: addressbook={0} - FOUND!", addressbook)); //NOI18N + // Found one! isValid = true; } catch (final NoResultException ex) { @@ -141,6 +147,9 @@ public class AddressbookSessionBean extends BaseDatabaseBean implements Addressb this.getLoggerBeanLocal().logDebug(MessageFormat.format("isAddressbookIdUsed: addressbookId={0} is not valid: {1}", addressbookId, ex)); //NOI18N } + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("isAddressbookIdUsed: isValid={0} - EXIT!", isValid)); //NOI18N + // Return result return isValid; }