]> git.mxchange.org Git - addressbook-ejb.git/commitdiff
Rewrite continued:
authorRoland Häder <roland@mxchange.org>
Mon, 26 Jun 2017 21:43:30 +0000 (23:43 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 26 Jun 2017 21:43:30 +0000 (23:43 +0200)
- Now all project-specific abstract web beans (controllers) inherit from BaseFacesBean to have these nice showFacesMessage() methods.
- Also all project-specific abstract EJBs inherit now only BaseDataBean (one was missing in an old project)
- So, if you have a WAR project, inherit from BaseFacesBean, if you have an EJB project, inherit from BaseDatabaseBean

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java
src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java
src/java/org/mxchange/addressbook/model/addressbook/share/SharedAddressbooksSessionBean.java
src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java
src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookAdminMobileProviderSessionBean.java
src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java
src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java
src/java/org/mxchange/jusercore/model/login/AddressbookUserLoginSessionBean.java
src/java/org/mxchange/jusercore/model/user/activity/AddressbookUserActivitySessionBean.java
src/java/org/mxchange/jusercore/model/user/resendlink/AddressbookResendLinkSessionBean.java

index daa9f24d3c9de1175f6267e61d1a44bf13ddcca2..97c3dc14dbc7d12e97d8e29eba8c476d07a81074 100644 (file)
@@ -65,7 +65,7 @@ public class AddressbookEmailDeliveryMessageBean extends BaseAddressbookDatabase
         */
        public AddressbookEmailDeliveryMessageBean () {
                // Call super constructor
-               super();
+               super("jms/addressbook-queue-factory", "jms/addressbook-email-queue"); //NOI18N
 
                // Init mailer instance
                this.mailer = new AddressbookMailer();
index a572183089883f710010d2749f74ca4e614708af..95e504518b6f46f8034e069225cbc92c2428448a 100644 (file)
@@ -22,21 +22,21 @@ import java.util.List;
 import javax.ejb.Stateless;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
+import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 import org.mxchange.jaddressbook.exceptions.AddressbookNameAlreadyUsedException;
 import org.mxchange.jaddressbook.exceptions.AddressbookNotFoundException;
 import org.mxchange.jaddressbook.model.addressbook.Addressbook;
 import org.mxchange.jaddressbook.model.addressbook.UserAddressbook;
 import org.mxchange.jaddressbook.model.addressbook.entry.AddressbookEntry;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
 import org.mxchange.jusercore.model.user.User;
 
 /**
- * A stateless bean handling addressbooks
+ * A stateless bean handling address books
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
 @Stateless (name = "addressbook", description = "A stateless bean for handling Addressbook addressbooks")
-public class AddressbookSessionBean extends BaseDatabaseBean implements AddressbookSessionBeanRemote {
+public class AddressbookSessionBean extends BaseAddressbookDatabaseBean implements AddressbookSessionBeanRemote {
 
        /**
         * Serial number
index 22c8a2f803f970af8b8b8f66dea0bf58b6f85b89..9a90c99fc8029a5cf4c85359ea23b7ab7fcb2d1b 100644 (file)
@@ -24,12 +24,12 @@ import java.util.Objects;
 import javax.ejb.Stateless;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
+import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 import org.mxchange.addressbook.model.shared.AddressbookShareSessionBeanRemote;
 import org.mxchange.jaddressbook.model.addressbook.Addressbook;
 import org.mxchange.jaddressbookshare.exceptions.UserAlreadySharingAddressbookException;
 import org.mxchange.jaddressbookshare.model.addressbook.shared.AddressbookShare;
 import org.mxchange.jaddressbookshare.model.addressbook.shared.ShareableAddressbook;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -38,7 +38,7 @@ import org.mxchange.jusercore.model.user.User;
  * @author Roland Häder<roland@mxchange.org>
  */
 @Stateless (name = "share", description = "A stateless bean for handling shared addressbooks")
-public class SharedAddressbooksSessionBean extends BaseDatabaseBean implements AddressbookShareSessionBeanRemote {
+public class SharedAddressbooksSessionBean extends BaseAddressbookDatabaseBean implements AddressbookShareSessionBeanRemote {
 
        /**
         * Serial number
index 3886a373f62169dfa65d15a9802238f8f5835724..8d1f5a47b409a28875b65d9aa92987d7ed9bc723 100644 (file)
@@ -23,7 +23,7 @@ import javax.ejb.Singleton;
 import javax.ejb.Startup;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
 
 /**
@@ -33,7 +33,7 @@ import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
  */
 @Startup
 @Singleton (name = "country", description = "A singleton session-scoped bean for country informations")
-public class AddressbookCountrySingletonBean extends BaseDatabaseBean implements CountrySingletonBeanRemote {
+public class AddressbookCountrySingletonBean extends BaseAddressbookDatabaseBean implements CountrySingletonBeanRemote {
 
        /**
         * Serial number
index 6ac361ca7e429f0f0f9d718c85533e36faa18cfb..923ad7fbf7f6452b8341792c905e5c755e7d861f 100644 (file)
@@ -19,7 +19,7 @@ package org.mxchange.jphone.phonenumbers.mobileprovider;
 import java.text.MessageFormat;
 import java.util.GregorianCalendar;
 import javax.ejb.Stateless;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException;
 
 /**
@@ -28,7 +28,7 @@ import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException;
  * @author Roland Häder<roland@mxchange.org>
  */
 @Stateless (name = "adminMobileProvider", description = "A singleton session-scoped bean for mobile provider informations, admin-edition")
-public class AddressbookAdminMobileProviderSessionBean extends BaseDatabaseBean implements AdminMobileProviderSessionBeanRemote {
+public class AddressbookAdminMobileProviderSessionBean extends BaseAddressbookDatabaseBean implements AdminMobileProviderSessionBeanRemote {
 
        /**
         * Serial number
index 3659bc5cc6d9c2ea5e05ea17aa26fdecece889a2..3de71394963f9c27ee1e3c85a49870f074c83dcc 100644 (file)
@@ -21,7 +21,7 @@ import java.util.List;
 import javax.ejb.Singleton;
 import javax.ejb.Startup;
 import javax.persistence.Query;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 
 /**
  * A singleton EJB for mobile provider informations
@@ -30,7 +30,7 @@ import org.mxchange.jcoreee.database.BaseDatabaseBean;
  */
 @Startup
 @Singleton (name = "mobileprovider", description = "A singleton session-scoped bean for SMS provider informations")
-public class AddressbookMobileProviderSingletonBean extends BaseDatabaseBean implements MobileProviderSingletonBeanRemote {
+public class AddressbookMobileProviderSingletonBean extends BaseAddressbookDatabaseBean implements MobileProviderSingletonBeanRemote {
 
        /**
         * Serial number
index 4858dacaa69a639a7266ab3dcf37aafe5c0962a6..63084f5470f1610f851c8181c2b6ea1d16c782dd 100644 (file)
@@ -21,7 +21,7 @@ import java.util.List;
 import javax.ejb.Stateless;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
@@ -36,7 +36,7 @@ import org.mxchange.jphone.phonenumbers.mobile.MobileNumber;
  * @author Roland Häder<roland@mxchange.org>
  */
 @Stateless (name = "phone", description = "A bean handling phone data")
-public class AddressbookPhoneSessionBean extends BaseDatabaseBean implements PhoneSessionBeanRemote {
+public class AddressbookPhoneSessionBean extends BaseAddressbookDatabaseBean implements PhoneSessionBeanRemote {
 
        /**
         * Serial number
index f27627d478e43700350239e98b65d29a2ae17dd1..347f87eea901c9a0ed681abb744fcf019742047a 100644 (file)
  */
 package org.mxchange.jusercore.model.login;
 
-import org.mxchange.jusercore.model.login.user.UserLoginSessionBeanRemote;
 import java.text.MessageFormat;
 import javax.ejb.EJB;
 import javax.ejb.Stateless;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 import org.mxchange.jusercore.container.login.LoginContainer;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
 import org.mxchange.jusercore.exceptions.UserStatusUnconfirmedException;
-import org.mxchange.jusercore.model.user.register.UserRegistrationSessionBeanRemote;
+import org.mxchange.jusercore.model.login.user.UserLoginSessionBeanRemote;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
 import org.mxchange.jusercore.model.user.UserUtils;
+import org.mxchange.jusercore.model.user.register.UserRegistrationSessionBeanRemote;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 
 /**
@@ -38,7 +38,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
  * @author Roland Häder<roland@mxchange.org>
  */
 @Stateless (name = "login", description = "A bean handling the user login for Addressbook project")
-public class AddressbookUserLoginSessionBean extends BaseDatabaseBean implements UserLoginSessionBeanRemote {
+public class AddressbookUserLoginSessionBean extends BaseAddressbookDatabaseBean implements UserLoginSessionBeanRemote {
 
        /**
         * Serial number
index 3198d433401b8d83b92bbb187e4694a7cbea5f4e..f8836898bc3071ca8838640307ae838d4e202dc8 100644 (file)
@@ -24,7 +24,7 @@ import javax.ejb.Stateless;
 import javax.jms.JMSException;
 import javax.jms.ObjectMessage;
 import javax.persistence.Query;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -35,7 +35,7 @@ import org.mxchange.jusercore.model.user.User;
  * @author Roland Häder<roland@mxchange.org>
  */
 @Stateless (name = "userActivity", description = "A bean handling the user data")
-public class AddressbookUserActivitySessionBean extends BaseDatabaseBean implements UserActivityLogSessionBeanRemote {
+public class AddressbookUserActivitySessionBean extends BaseAddressbookDatabaseBean implements UserActivityLogSessionBeanRemote {
 
        /**
         * Serial number
@@ -149,7 +149,7 @@ public class AddressbookUserActivitySessionBean extends BaseDatabaseBean impleme
        @SuppressWarnings ("unchecked")
        public List<LogableUserActivity> fetchAllUsersActivityLogByMultipleType (final User user, final String[] activityTypes) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fetchAllUsersActivityLogByType: user={1},activityTypes={2} - CALLED!", this.getClass().getSimpleName(), user, activityTypes)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.fetchAllUsersActivityLogByType: user={1},activityTypes={2} - CALLED!", this.getClass().getSimpleName(), user, Arrays.toString(activityTypes))); //NOI18N
 
                // Is user valid?
                if (null == user) {
index a82f3c49ae2f22b45fd6d571bf8ee3cf3eaae632..242fad7e15057ba60c9ad34ad53e8e7e4fb17c4d 100644 (file)
@@ -28,10 +28,10 @@ import org.mxchange.addressbook.database.BaseAddressbookDatabaseBean;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
-import org.mxchange.jusercore.model.user.register.UserRegistrationSessionBeanRemote;
 import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
+import org.mxchange.jusercore.model.user.register.UserRegistrationSessionBeanRemote;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 
 /**