}
// 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
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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
+++ /dev/null
-/*
- * Copyright (C) 2016 Cho-Time GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.pizzaapplication.mailer.model.delivery;
-
-import de.chotime.landingpage.database.BaseLandingDatabaseBean;
-import de.chotime.landingpage.mailer.model.delivery.DeliverableLandingEmail;
-import de.chotime.landingpage.mailer.model.delivery.LandingMailer;
-import java.io.Serializable;
-import java.text.MessageFormat;
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.ObjectMessage;
-
-/**
- * A message-driven bean for sending out emails
- * <p>
- * @author Roland Haeder<rhaeder@cho-time.de>
- */
-@MessageDriven (activationConfig = {
- @ActivationConfigProperty (propertyName = "destinationLookup", propertyValue = "jms/jlandingpage-email-queue"),
- @ActivationConfigProperty (propertyName = "destinationType", propertyValue = "javax.jms.Queue")
-})
-public class EmailDeliveryMessageBean extends BaseLandingDatabaseBean implements MessageListener {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 75_638_176_619_024L;
-
- /**
- * Mailer instance
- */
- private final DeliverableLandingEmail mailer;
-
- /**
- * Default constructor
- */
- public EmailDeliveryMessageBean () {
- // Init mailer instance
- this.mailer = new LandingMailer();
- }
-
- @Override
- public void onMessage (final Message message) {
- // Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("onMessage: message={0} - CALLED!", message)); //NOI18N
- // The parameter should be valid
- if (null == message) {
- // Throw NPE
- throw new NullPointerException("message is null"); //NOI18N
- } else if (!(message instanceof ObjectMessage)) {
- // Not implementing right interface
- throw new IllegalArgumentException(MessageFormat.format("message={0} does not implemented ObjectMessage", message)); //NOI18N
- }
-
- // Securely cast it
- ObjectMessage objectMessage = (ObjectMessage) message;
-
- // Init variable
- Serializable serializable;
-
- try {
- // Get object from message
- serializable = objectMessage.getObject();
- } catch (final JMSException ex) {
- // Log it and don't continue any further
- this.getLoggerBeanLocal().logException(ex);
- return;
- }
-
- // Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("onMessage: serializable={0}", serializable)); //NOI18N
-
- // Trace message
- this.getLoggerBeanLocal().logTrace("onMessage - EXIT!"); //NOI18N
- }
-
-}
--- /dev/null
+/*
+ * Copyright (C) 2016 Cho-Time GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.mailer.model.delivery;
+
+import de.chotime.landingpage.database.BaseLandingDatabaseBean;
+import de.chotime.landingpage.mailer.model.delivery.DeliverableLandingEmail;
+import de.chotime.landingpage.mailer.model.delivery.LandingMailer;
+import java.io.Serializable;
+import java.text.MessageFormat;
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.ObjectMessage;
+
+/**
+ * A message-driven bean for sending out emails
+ * <p>
+ * @author Roland Haeder<rhaeder@cho-time.de>
+ */
+@MessageDriven (activationConfig = {
+ @ActivationConfigProperty (propertyName = "destinationLookup", propertyValue = "jms/jlandingpage-email-queue"),
+ @ActivationConfigProperty (propertyName = "destinationType", propertyValue = "javax.jms.Queue")
+})
+public class PizzaEmailDeliveryMessageBean extends BaseLandingDatabaseBean implements MessageListener {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 75_638_176_619_024L;
+
+ /**
+ * Mailer instance
+ */
+ private final DeliverableLandingEmail mailer;
+
+ /**
+ * Default constructor
+ */
+ public PizzaEmailDeliveryMessageBean () {
+ // Init mailer instance
+ this.mailer = new LandingMailer();
+ }
+
+ @Override
+ public void onMessage (final Message message) {
+ // Trace message
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("onMessage: message={0} - CALLED!", message)); //NOI18N
+ // The parameter should be valid
+ if (null == message) {
+ // Throw NPE
+ throw new NullPointerException("message is null"); //NOI18N
+ } else if (!(message instanceof ObjectMessage)) {
+ // Not implementing right interface
+ throw new IllegalArgumentException(MessageFormat.format("message={0} does not implemented ObjectMessage", message)); //NOI18N
+ }
+
+ // Securely cast it
+ ObjectMessage objectMessage = (ObjectMessage) message;
+
+ // Init variable
+ Serializable serializable;
+
+ try {
+ // Get object from message
+ serializable = objectMessage.getObject();
+ } catch (final JMSException ex) {
+ // Log it and don't continue any further
+ this.getLoggerBeanLocal().logException(ex);
+ return;
+ }
+
+ // Debug message
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("onMessage: serializable={0}", serializable)); //NOI18N
+
+ // Trace message
+ this.getLoggerBeanLocal().logTrace("onMessage - EXIT!"); //NOI18N
+ }
+
+}