]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
better throw EJBException here
authorRoland Haeder <roland@mxchange.org>
Sat, 12 Mar 2016 18:53:43 +0000 (19:53 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 12 Mar 2016 18:53:43 +0000 (19:53 +0100)
src/java/org/mxchange/jusercore/model/user/UserSessionBean.java

index edd88dd18f6eb70b89a4487150fab3f887507d99..145295be7b1fed4fbfab94e9dc788d74721095e8 100644 (file)
@@ -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