From: Roland Haeder Date: Wed, 9 Sep 2015 09:26:02 +0000 (+0200) Subject: updated jshop-ee-lib.jar + added thrown exception X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5419beca56018f1af80e0089db8b736295a785c7;p=pizzaservice-war.git updated jshop-ee-lib.jar + added thrown exception Signed-off-by:Roland Häder --- diff --git a/lib/jshop-ee-lib.jar b/lib/jshop-ee-lib.jar index 1697bcc7..f1e16d8e 100644 Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ diff --git a/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java index 240437b7..9c5875d5 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java @@ -23,6 +23,7 @@ import javax.inject.Named; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.beans.BaseFrameworkBean; +import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException; import org.mxchange.jshopcore.model.category.Category; import org.mxchange.jshopcore.model.category.CategorySessionBeanRemote; @@ -62,7 +63,7 @@ public class AdminCategoryWebBean extends BaseFrameworkBean implements AdminCate try { // Deligate to bean this.category.doAdminAddCategory(category); - } catch (final RemoteException ex) { + } catch (final CategoryTitleAlreadyUsedException | RemoteException ex) { // Continue to throw throw new FaceletException(ex); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java index 0792c6b8..5ab300db 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java @@ -24,6 +24,7 @@ import javax.inject.Named; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.jcoreee.beans.BaseFrameworkBean; +import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException; import org.mxchange.jshopcore.model.product.Product; import org.mxchange.jshopcore.model.product.ProductSessionBeanRemote; @@ -60,8 +61,13 @@ public class AdminProductWebBean extends BaseFrameworkBean implements AdminProdu @Override public void doAdminAddProduct (final Product product) throws FaceletException { - // Call bean - this.product.doAdminAddProduct(product); + try { + // Call bean + this.product.doAdminAddProduct(product); + } catch (final ProductTitleAlreadyUsedException ex) { + // Continue to throw + throw new FaceletException(ex); + } } @Override