]> git.mxchange.org Git - jjobs-ejb.git/blobdiff - src/java/org/mxchange/juserlogincore/model/user/resendlink/JobsResendLinkSessionBean.java
Updated copyright year
[jjobs-ejb.git] / src / java / org / mxchange / juserlogincore / model / user / resendlink / JobsResendLinkSessionBean.java
index a78749bb9beaa832963e172c3cc98992a966da1c..4e18f635d9fb48edd1826426fbea220c621738b1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2022 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
@@ -20,7 +20,7 @@ import java.text.MessageFormat;
 import java.util.Locale;
 import javax.ejb.EJB;
 import javax.ejb.Stateless;
-import org.mxchange.jjobs.database.BaseJobsDatabaseBean;
+import org.mxchange.jjobs.enterprise.BaseJobsEnterpriseBean;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
@@ -36,7 +36,7 @@ import org.mxchange.juserlogincore.model.user.register.UserRegistrationSessionBe
  * @author Roland Häder<roland@mxchange.org>
  */
 @Stateless (name = "userResendConfirmationLink", description = "A bean resending confirmation links")
-public class JobsResendLinkSessionBean extends BaseJobsDatabaseBean implements ResendLinkSessionBeanRemote {
+public class JobsResendLinkSessionBean extends BaseJobsEnterpriseBean implements ResendLinkSessionBeanRemote {
 
        /**
         * Serial number
@@ -46,13 +46,13 @@ public class JobsResendLinkSessionBean extends BaseJobsDatabaseBean implements R
        /**
         * Registration bean
         */
-       @EJB
+       @EJB (lookup = "java:global/jjobs-ejb/userRegistration!org.mxchange.juserlogincore.model.user.register.UserRegistrationSessionBeanRemote")
        private UserRegistrationSessionBeanRemote registerBean;
 
        /**
         * Regular user bean
         */
-       @EJB
+       @EJB (lookup = "java:global/jjobs-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote")
        private UserSessionBeanRemote userBean;
 
        /**
@@ -60,7 +60,7 @@ public class JobsResendLinkSessionBean extends BaseJobsDatabaseBean implements R
         */
        public JobsResendLinkSessionBean () {
                // Call super constructor
-               super("jms/addressbook-queue-factory", "jms/addressbook-email-queue"); //NOI18N
+               super("jms/jjobs-queue-factory", "jms/jjobs-email-queue"); //NOI18N
        }
 
        @Override
@@ -96,13 +96,13 @@ public class JobsResendLinkSessionBean extends BaseJobsDatabaseBean implements R
                }
 
                // Get new registration key
-               String confirmationKey = this.registerBean.generateConfirmationKey(user);
+               final String confirmationKey = this.registerBean.generateConfirmationKey(user);
 
                // Debug message
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.resendConfirmationLink: confirmationKey={1}", this.getClass().getSimpleName(), confirmationKey)); //NOI18N
 
                // Get managed instance
-               User managedUser = this.getEntityManager().find(LoginUser.class, user.getUserId());
+               final User managedUser = this.getEntityManager().find(LoginUser.class, user.getUserId());
 
                // Set it in user
                managedUser.setUserConfirmKey(confirmationKey);