From: Roland Haeder Date: Fri, 16 Oct 2015 10:23:04 +0000 (+0200) Subject: let the logger log the size of the list X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ff360a0c27b922dc5371c8af9f1c037be73d99b8;p=jfinancials-mailer-ejb.git let the logger log the size of the list Signed-off-by:Roland Häder --- diff --git a/src/java/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBean.java b/src/java/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBean.java index 2608b58..edb9b1c 100644 --- a/src/java/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBean.java +++ b/src/java/org/mxchange/addressbook/model/shared/SharedAddressbooksSessionBean.java @@ -61,13 +61,19 @@ public class SharedAddressbooksSessionBean extends BaseDatabaseBean implements S } // Get named query - Query query = this.getEntityManager().createNamedQuery("SearchUserSharedAddressbooks"); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchUserSharedAddressbooks", List.class); //NOI18N // Set parameter query.setParameter("user", user); //NOI18N // Return full list - return query.getResultList(); + List list = query.getResultList(); + + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("allSharedAddressbooks: list.size()={0} - EXIT!", list.size())); + + // Return list + return list; } @Override