- 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>
*/
public AddressbookEmailDeliveryMessageBean () {
// Call super constructor
- super();
+ super("jms/addressbook-queue-factory", "jms/addressbook-email-queue"); //NOI18N
// Init mailer instance
this.mailer = new AddressbookMailer();
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
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;
/**
* @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
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;
/**
*/
@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
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;
/**
* @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
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
*/
@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
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;
* @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
*/
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;
/**
* @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
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;
/**
* @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
@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) {
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;
/**