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

index 168f75b788bc6ddf798072c677b953b60df6c4ba..2f0cb500b9900248c0a12e8b709353996369ca7d 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