From: Roland Haeder Date: Sat, 12 Mar 2016 18:53:43 +0000 (+0100) Subject: better throw EJBException here X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c34281aa28ab752d4c3914159d3823b90b25ac86;p=jjobs-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 edd88dd..145295b 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