From fc7b84e50cad45de59c6219f40955e471ba960dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 18 May 2016 11:01:48 +0200 Subject: [PATCH] Continued a bit: - renamed to have project name in it - sending out mails over a message-driven bean is an asynchronous approach and will keep the other EJBs running fast - use class, not interface everywhere MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../jusercore/model/user/PizzaUserSessionBean.java | 14 +++++++------- ...ean.java => PizzaEmailDeliveryMessageBean.java} | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) rename src/java/org/mxchange/pizzaapplication/mailer/model/delivery/{EmailDeliveryMessageBean.java => PizzaEmailDeliveryMessageBean.java} (95%) diff --git a/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java index ddd1d20..2174f56 100644 --- a/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java @@ -186,7 +186,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS } // Try to locate it - Query query = this.getEntityManager().createNamedQuery("SearchUserByName", User.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N // Set parameter query.setParameter("param", user.getUserName()); //NOI18N @@ -228,7 +228,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS } // Create query instance - Query query = this.getEntityManager().createNamedQuery("SearchUserById", User.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchUserById", LoginUser.class); //NOI18N // Set user id query.setParameter("id", userId); //NOI18N @@ -311,7 +311,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS } // Generate query - Query query = this.getEntityManager().createNamedQuery("SearchUserById", User.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchUserById", LoginUser.class); //NOI18N // Set parameter query.setParameter("id", user.getUserId()); //NOI18N @@ -358,7 +358,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS } // Generate query - Query query = this.getEntityManager().createNamedQuery("SearchUserById", User.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchUserById", LoginUser.class); //NOI18N // Set parameter query.setParameter("id", userId); //NOI18N @@ -405,7 +405,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS } // Generate query - Query query = this.getEntityManager().createNamedQuery("SearchUserByName", User.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N // Set parameter query.setParameter("param", userName); //NOI18N @@ -443,7 +443,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS } // Generate query - Query query = this.getEntityManager().createNamedQuery("SearchUserByEmailAddress", User.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchUserByEmailAddress", LoginUser.class); //NOI18N // Set parameter query.setParameter("param", user.getUserContact().getContactEmailAddress()); //NOI18N @@ -484,7 +484,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS } // Generate query - Query query = this.getEntityManager().createNamedQuery("SearchUserByName", User.class); //NOI18N + Query query = this.getEntityManager().createNamedQuery("SearchUserByName", LoginUser.class); //NOI18N // Set parameter query.setParameter("param", user.getUserName()); //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/mailer/model/delivery/EmailDeliveryMessageBean.java b/src/java/org/mxchange/pizzaapplication/mailer/model/delivery/PizzaEmailDeliveryMessageBean.java similarity index 95% rename from src/java/org/mxchange/pizzaapplication/mailer/model/delivery/EmailDeliveryMessageBean.java rename to src/java/org/mxchange/pizzaapplication/mailer/model/delivery/PizzaEmailDeliveryMessageBean.java index c92c026..3df748b 100644 --- a/src/java/org/mxchange/pizzaapplication/mailer/model/delivery/EmailDeliveryMessageBean.java +++ b/src/java/org/mxchange/pizzaapplication/mailer/model/delivery/PizzaEmailDeliveryMessageBean.java @@ -37,7 +37,7 @@ import javax.jms.ObjectMessage; @ActivationConfigProperty (propertyName = "destinationLookup", propertyValue = "jms/jlandingpage-email-queue"), @ActivationConfigProperty (propertyName = "destinationType", propertyValue = "javax.jms.Queue") }) -public class EmailDeliveryMessageBean extends BaseLandingDatabaseBean implements MessageListener { +public class PizzaEmailDeliveryMessageBean extends BaseLandingDatabaseBean implements MessageListener { /** * Serial number @@ -52,7 +52,7 @@ public class EmailDeliveryMessageBean extends BaseLandingDatabaseBean implements /** * Default constructor */ - public EmailDeliveryMessageBean () { + public PizzaEmailDeliveryMessageBean () { // Init mailer instance this.mailer = new LandingMailer(); } -- 2.39.5