From: Roland Haeder Date: Sat, 12 Mar 2016 18:53:33 +0000 (+0100) Subject: better throw EJBException here X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a3a2f7be7bc52ea8b095c16b65217efb28eba7c1;p=jfinancials-mailer-ejb.git better throw EJBException here --- diff --git a/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java index 168f75b..2f0cb50 100644 --- a/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/UserSessionBean.java @@ -19,6 +19,7 @@ package org.mxchange.jusercore.model.user; import java.text.MessageFormat; import java.util.GregorianCalendar; import java.util.List; +import javax.ejb.EJBException; import javax.ejb.Stateless; import javax.persistence.NoResultException; import javax.persistence.PersistenceException; @@ -358,7 +359,7 @@ public class UserSessionBean extends BaseDatabaseBean implements UserSessionBean throw new NullPointerException("user.userAccountStatus is null"); //NOI18N } else if (!this.ifUserExists(user)) { // User does not exist - throw new PersistenceException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N + throw new EJBException(MessageFormat.format("User with id {0} does not exist.", user.getUserId())); //NOI18N } // Find the instance