From c34281aa28ab752d4c3914159d3823b90b25ac86 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 12 Mar 2016 19:53:43 +0100 Subject: [PATCH] better throw EJBException here --- .../org/mxchange/jusercore/model/user/UserSessionBean.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5