From: Roland Häder Date: Mon, 26 Jun 2017 21:43:30 +0000 (+0200) Subject: Rewrite continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bdfe6e818a12e92a4e28b27172fae2a1c9b559b6;p=pizzaservice-mailer-ejb.git Rewrite continued: - 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 --- diff --git a/src/java/org/mxchange/addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java b/src/java/org/mxchange/addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java index daa9f24..97c3dc1 100644 --- a/src/java/org/mxchange/addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java +++ b/src/java/org/mxchange/addressbook/mailer/model/delivery/AddressbookEmailDeliveryMessageBean.java @@ -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(); diff --git a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java index a572183..95e5045 100644 --- a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java +++ b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java @@ -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 *

* @author Roland Häder */ @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 diff --git a/src/java/org/mxchange/addressbook/model/addressbook/share/SharedAddressbooksSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbook/share/SharedAddressbooksSessionBean.java index 22c8a2f..9a90c99 100644 --- a/src/java/org/mxchange/addressbook/model/addressbook/share/SharedAddressbooksSessionBean.java +++ b/src/java/org/mxchange/addressbook/model/addressbook/share/SharedAddressbooksSessionBean.java @@ -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 */ @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 diff --git a/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java b/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java index 3886a37..8d1f5a4 100644 --- a/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java @@ -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 diff --git a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookAdminMobileProviderSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookAdminMobileProviderSessionBean.java index 6ac361c..923ad7f 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookAdminMobileProviderSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookAdminMobileProviderSessionBean.java @@ -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 */ @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 diff --git a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java index 3659bc5..3de7139 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/mobileprovider/AddressbookMobileProviderSingletonBean.java @@ -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 diff --git a/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java b/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java index 4858dac..63084f5 100644 --- a/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/phonenumbers/phone/AddressbookPhoneSessionBean.java @@ -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 */ @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 diff --git a/src/java/org/mxchange/jusercore/model/login/AddressbookUserLoginSessionBean.java b/src/java/org/mxchange/jusercore/model/login/AddressbookUserLoginSessionBean.java index f27627d..347f87e 100644 --- a/src/java/org/mxchange/jusercore/model/login/AddressbookUserLoginSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/login/AddressbookUserLoginSessionBean.java @@ -16,20 +16,20 @@ */ 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 */ @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 diff --git a/src/java/org/mxchange/jusercore/model/user/activity/AddressbookUserActivitySessionBean.java b/src/java/org/mxchange/jusercore/model/user/activity/AddressbookUserActivitySessionBean.java index 3198d43..f883689 100644 --- a/src/java/org/mxchange/jusercore/model/user/activity/AddressbookUserActivitySessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/activity/AddressbookUserActivitySessionBean.java @@ -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 */ @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 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) { diff --git a/src/java/org/mxchange/jusercore/model/user/resendlink/AddressbookResendLinkSessionBean.java b/src/java/org/mxchange/jusercore/model/user/resendlink/AddressbookResendLinkSessionBean.java index a82f3c4..242fad7 100644 --- a/src/java/org/mxchange/jusercore/model/user/resendlink/AddressbookResendLinkSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/resendlink/AddressbookResendLinkSessionBean.java @@ -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; /**