From dafd1eea63b093fd33e506d9f8753bab140c3a30 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 4 Sep 2015 15:11:43 +0200 Subject: [PATCH] =?utf8?q?Better=20compatibility=20to=20Linux/MacOS=20+=20?= =?utf8?q?updated=20jcore=20(towards=20EJBs)=20and=20added=20some=20client?= =?utf8?q?s=20(still=20the=20license=20files=20are=20needed=20to=20locate)?= =?utf8?q?=20+=20don't=20reference=20*-war=20project=20as=20this=20would?= =?utf8?q?=20cause=20CDI=20(local=20calls=20only,=20no=20remote=20calls).?= =?utf8?q?=20Please=20remember=20that=20this=20commit=20is=20a=20broken=20?= =?utf8?q?commit!=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- PizzaService-ejb/lib/jcore.jar | Bin 112822 -> 115002 bytes PizzaService-ejb/lib/jsfcore.jar | Bin 20348 -> 18794 bytes PizzaService-ejb/nbproject/project.properties | 21 +- .../beans/controller/PizzaBean.java | 61 ++-- .../beans/controller/PizzaServiceBean.java | 87 +++-- .../customer/ShopCustomerSessionBean.java | 310 ++++++++++++++++++ .../beans/data/ShopDataBean.java | 31 +- .../pizzaservice/PizzaServiceSessionBean.java | 22 +- .../tags/basket/MiniBasketTag.java | 4 +- nbproject/build-impl.xml | 10 - nbproject/genfiles.properties | 6 +- nbproject/project.properties | 4 - nbproject/project.xml | 12 - 13 files changed, 406 insertions(+), 162 deletions(-) create mode 100644 PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/customer/ShopCustomerSessionBean.java diff --git a/PizzaService-ejb/lib/jcore.jar b/PizzaService-ejb/lib/jcore.jar index 01a404f97a84fd8344e0f5c4435b19dea669b71c..a12ac5b19d5bcc7db279d9eb1a63371754fe22ac 100644 GIT binary patch delta 16835 zcma)j34B$>_5V3@?|b*=%YhAEfZELI6TJ6ue+tvl;|DCz-y)4lGr+mnrxo2k1ocYd~GiT17 zSNE0s%pHbz^e|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N`qi zyqg%pFNmOm9ERx;9w25FIoQeJ4b;#`K|LvI5r9OVS5QZD8##YK>UzXv65fW6N{phgXM2IU)iltxmuoemf8iL zcDLpUyju2^g=d0sYyEa}zNmc5e|2|>IdARnq`Ju$`mNIUQGb(I{FxRBD#CpN;^AQd z?}wuT?uI7?Ob(2$F8cZPfh}VA=fFV$6NBRdE)VX>f4FS&{Gsh)XaA62Dt7TD_j;cwVqP+6u&QBFUv|c)H?sxI@oO?}Lz~6NG8~!hR`^Kf7TN)r* zM@~g}@$^e2d}m}xWN<#>m##lTHkG`*!pF} getAvailableProductsIterator () throws ServletException; + public Iterator getAvailableProductsIterator () throws RemoteException; /** * Some "getter" for an iterator of all products * * @return All products - * @throws javax.servlet.ServletException If anything went wrong + * @throws java.rmi.RemoteException If anything went wrong */ - public Iterator getAllProductsIterator () throws ServletException; + public Iterator getAllProductsIterator () throws RemoteException; /** * Some "getter" for an iterator of all categories * * @return All categories - * @throws javax.servlet.ServletException If anything went wrong + * @throws java.rmi.RemoteException If anything went wrong */ - public Iterator getAllCategoriesIterator () throws ServletException; + public Iterator getAllCategoriesIterator () throws RemoteException; /** * Some "getter" for a linked list of only available products * * @return Only available products - * @throws javax.servlet.ServletException If anything went wrong + * @throws java.rmi.RemoteException If anything went wrong */ - public Deque getAvailableProducts () throws ServletException; + public Deque getAvailableProducts () throws RemoteException; /** * Some "getter" for a linked list of all products * * @return All products - * @throws javax.servlet.ServletException If anything went wrong + * @throws java.rmi.RemoteException If anything went wrong */ - public Deque getAllProducts () throws ServletException; + public Deque getAllProducts () throws RemoteException; /** * Some "getter" for a linked list of all categories * * @return All categories - * @throws javax.servlet.ServletException If anything went wrong + * @throws java.rmi.RemoteException If anything went wrong */ - public Deque getAllCategories () throws ServletException; + public Deque getAllCategories () throws RemoteException; /** * Generates a link for category's parent category. If none is given, the method will return only a small @@ -115,49 +112,47 @@ public interface PizzaBean extends FrameworkBean { * * @param product Product instance to check * @return Human-readable version of product availability - * @throws javax.servlet.ServletException If something unexpected happened + * @throws java.rmi.RemoteException If something unexpected happened * @deprecated Old lost code */ @Deprecated - public String getPrintableProduktCategory (final Product product) throws ServletException; + public String getPrintableProduktCategory (final Product product) throws RemoteException; /** * Adds given category data from request to database * - * @param request Request instance - * @throws javax.servlet.ServletException If something unexpected happened - * @throws org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException If the given title is already used + * @param category Category instance + * @throws java.rmi.RemoteException If something unexpected happened */ - public void doAdminAddCategory (final ServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException; + public void doAdminAddCategory (final Category category) throws RemoteException; /** * Adds given product data from request to database * - * @param request Request instance - * @throws javax.servlet.ServletException If something unexpected happened - * @throws org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException If the given product title is already used + * @param product Product instance + * @throws java.rmi.RemoteException If something unexpected happened */ - public void doAdminAddProduct (final ServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; + public void doAdminAddProduct (final Product product) throws RemoteException; /** * Handles admin product form requests * - * @throws ServletException If something unexpected happened + * @throws java.rmi.RemoteException If something unexpected happened */ - public void doAdminHandleProductForms () throws ServletException; + public void doAdminHandleProductForms () throws RemoteException; /** * Handles admin category form requests * - * @throws ServletException If something unexpected happened + * @throws java.rmi.RemoteException If something unexpected happened */ - public void doAdminHandleCategoryForms () throws ServletException; + public void doAdminHandleCategoryForms () throws RemoteException; /** * Some "getter" for a product from given item * @param item Item instance * @return A Product instance - * @throws javax.servlet.ServletException If something bad happens + * @throws java.rmi.RemoteException If something bad happens */ - public Product getProduct (final AddableBasketItem item) throws ServletException; + public Product getProduct (final AddableBasketItem item) throws RemoteException; } diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java index 76cedd6..369b1b9 100644 --- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java +++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java @@ -18,16 +18,12 @@ package org.mxchange.pizzaapplication.beans.controller; import java.io.IOException; import java.lang.reflect.InvocationTargetException; +import java.rmi.RemoteException; import java.sql.SQLException; -import java.text.MessageFormat; import java.util.Deque; import java.util.Iterator; import javax.annotation.PostConstruct; -import javax.enterprise.context.SessionScoped; -import javax.faces.FacesException; -import javax.inject.Named; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; +import javax.ejb.Stateless; import org.mxchange.jcore.exceptions.BadTokenException; import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException; import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException; @@ -45,8 +41,7 @@ import org.mxchange.pizzaapplication.application.PizzaServiceApplication; * * @author Roland Haeder */ -@Named("controller") -@SessionScoped +@Stateless(name="controller", mappedName = "ejb/stateless-controller") public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { /** * Serial id @@ -76,22 +71,16 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { @Override @PostConstruct - public void init () throws FacesException { + public void init () throws RuntimeException { // Trace message - this.getLogger().trace(MessageFormat.format("application={0} - CALLED!", this.getApplication())); //NOI18N - - // Must not be null - if (this.getApplication() == null) { - // Abort here - throw new NullPointerException("application is null"); //NOI18N - } + this.getLogger().trace("CALLED!"); //NOI18N try { // Call init method - this.app.init(this.getApplication()); + this.app.init(); } catch (final UnsupportedDatabaseBackendException | SQLException | IOException | BadTokenException ex) { // Continue to throw - throw new FacesException(ex); + throw new RuntimeException(ex); } } @@ -102,124 +91,126 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { } @Override - public Iterator getAvailableProductsIterator () throws ServletException { + public Iterator getAvailableProductsIterator () throws RemoteException { try { return this.app.getAvailableProductsIterator(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("getAvailableProductsIterator() failed.", ex); } } @Override - public Iterator getAllProductsIterator () throws ServletException { + public Iterator getAllProductsIterator () throws RemoteException { try { return this.app.getAllProductsIterator(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("getAllProductsIterator() failed.", ex); } } @Override - public Deque getAvailableProducts () throws ServletException { + public Deque getAvailableProducts () throws RemoteException { try { return this.app.getAvailableProducts(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("getAvailableProducts() failed.", ex); } } @Override - public Deque getAllProducts () throws ServletException { + public Deque getAllProducts () throws RemoteException { try { return this.app.getAllProducts(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("getAllProducts() failed.", ex); } } @Override - public Iterator getAllCategoriesIterator () throws ServletException { + public Iterator getAllCategoriesIterator () throws RemoteException { try { return this.app.getAllCategoriesIterator(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("getAllCategoriesIterator() failed.", ex); } } @Override - public Deque getAllCategories () throws ServletException { + public Deque getAllCategories () throws RemoteException { try { return this.app.getAllCategories(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("getAllCategories() failed.", ex); } } @Override - public void doAdminAddCategory (final ServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException { + public void doAdminAddCategory (final Category category) throws RemoteException { try { - this.app.doAdminAddCategory(request); - } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + this.app.doAdminAddCategory(category); + } catch (final CategoryTitleAlreadyUsedException | IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("doAdminAddCategory() failed.", ex); } } @Override - public void doAdminAddProduct (final ServletRequest request) throws ServletException, ProductTitleAlreadyUsedException { + public void doAdminAddProduct (final Product product) throws RemoteException { try { - this.app.doAdminAddProduct(request); - } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + this.app.doAdminAddProduct(product); + } catch (final ProductTitleAlreadyUsedException | IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("doAdminAddProduct() failed.", ex); } } @Override @Deprecated - public String getPrintableProduktCategory (final Product product) throws ServletException { + public String getPrintableProduktCategory (final Product product) throws RemoteException { try { return this.app.getPrintableProductCategory(product); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("getPrintableProduktCategory() failed.", ex); } } @Override - public void doAdminHandleProductForms () throws ServletException { + @Deprecated + public void doAdminHandleProductForms () throws RemoteException { try { - this.app.doAdminHandleProductForms(this.getRequest(), this.getResponse()); + this.app.doAdminHandleProductForms(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException | ProductTitleAlreadyUsedException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("doAdminHandleProductForms() failed.", ex); } } @Override - public void doAdminHandleCategoryForms () throws ServletException { + @Deprecated + public void doAdminHandleCategoryForms () throws RemoteException { try { - this.app.doAdminHandleCategoryForms(this.getRequest(), this.getResponse()); + this.app.doAdminHandleCategoryForms(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException | CategoryTitleAlreadyUsedException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("doAdminHandleCategoryForms() failed.", ex); } } @Override - public Product getProduct (final AddableBasketItem item) throws ServletException { + public Product getProduct (final AddableBasketItem item) throws RemoteException { try { // Deligate to application return this.app.getProduct(item); } catch (IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { // Continue to throw - throw new ServletException(ex); + throw new RemoteException("getProduct() failed.", ex); } } diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/customer/ShopCustomerSessionBean.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/customer/ShopCustomerSessionBean.java new file mode 100644 index 0000000..7ec4c77 --- /dev/null +++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/customer/ShopCustomerSessionBean.java @@ -0,0 +1,310 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.pizzaapplication.beans.customer; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.util.Iterator; +import java.util.Map; +import javax.ejb.Stateless; +import javax.servlet.ServletException; +import org.mxchange.jcore.client.Client; +import org.mxchange.jcore.contact.Contact; +import org.mxchange.jcore.contact.gender.Gender; +import org.mxchange.jshop.beans.BaseFrameworkBean; +import org.mxchange.jshop.beans.remote.customer.CustomerSessionBeanRemote; +import org.mxchange.jshop.customer.ShopCustomer; + +/** + * A customer bean which hides the customer instance + * + * @author Roland Haeder + */ +@Stateless(name="customer", mappedName = "ejb/stateless-customer") +public class ShopCustomerSessionBean extends BaseFrameworkBean implements CustomerSessionBeanRemote { + /** + * Serial number + */ + private static final long serialVersionUID = 542145347916L; + + /** + * Contact instance + */ + private Contact contact; + + /** + * Default constructor + */ + public ShopCustomerSessionBean () { + // Instance customer + Contact customer = new ShopCustomer(); + + // And set it here + this.setContact(customer); + } + + @Override + public String getBirthday () { + // Deligate to "hidden" object + return this.getContact().getBirthday(); + } + + @Override + public void setBirthday (final String birthday) { + // Deligate to "hidden" object + this.getContact().setBirthday(birthday); + } + + @Override + public String getCellphoneNumber () { + // Deligate to "hidden" object + return this.getContact().getCellphoneNumber(); + } + + @Override + public void setCellphoneNumber (final String cellphoneNumber) { + // Deligate to "hidden" object + this.getContact().setCellphoneNumber(cellphoneNumber); + } + + @Override + public String getCity () { + // Deligate to "hidden" object + return this.getContact().getCity(); + } + + @Override + public void setCity (final String city) { + // Deligate to "hidden" object + this.getContact().setCity(city); + } + + @Override + public String getComment () { + // Deligate to "hidden" object + return this.getContact().getComment(); + } + + @Override + public void setComment (final String comment) { + // Deligate to "hidden" object + this.getContact().setComment(comment); + } + + @Override + public String getCompanyName () { + // Deligate to "hidden" object + return this.getContact().getCompanyName(); + } + + @Override + public void setCompanyName (final String companyName) { + // Deligate to "hidden" object + this.getContact().setCompanyName(companyName); + } + + @Override + public String getCountryCode () { + // Deligate to "hidden" object + return this.getContact().getCountryCode(); + } + + @Override + public void setCountryCode (final String countryCode) { + // Deligate to "hidden" object + this.getContact().setCountryCode(countryCode); + } + + @Override + public String getEmailAddress () { + // Deligate to "hidden" object + return this.getContact().getEmailAddress(); + } + + @Override + public void setEmailAddress (final String emailAddress) { + // Deligate to "hidden" object + this.getContact().setEmailAddress(emailAddress); + } + + @Override + public String getFamilyName () { + // Trace call + //* NOISY-DEBUG: */ this.getLogger().trace("CALLED!"); + + // Deligate to "hidden" object + return this.getContact().getFamilyName(); + } + + @Override + public void setFamilyName (final String familyName) { + // Trace call + //* NOISY-DEBUG: */ this.getLogger().trace(MessageFormat.format("familyName={0} - CALLED!", familyName)); + + // Deligate to "hidden" object + this.getContact().setFamilyName(familyName); + } + + @Override + public String getFaxNumber () { + // Deligate to "hidden" object + return this.getContact().getFaxNumber(); + } + + @Override + public void setFaxNumber (final String faxNumber) { + // Deligate to "hidden" object + this.getContact().setFaxNumber(faxNumber); + } + + @Override + public Gender getGender () { + // Deligate to "hidden" object + return this.getContact().getGender(); + } + + @Override + public void setGender (final Gender gender) { + // Deligate to "hidden" object + this.getContact().setGender(gender); + } + + @Override + public Long getHouseNumber () { + // Deligate to "hidden" object + return this.getContact().getHouseNumber(); + } + + @Override + public void setHouseNumber (final Long houseNumber) { + // Deligate to "hidden" object + this.getContact().setHouseNumber(houseNumber); + } + + @Override + public String getPhoneNumber () { + // Deligate to "hidden" object + return this.getContact().getPhoneNumber(); + } + + @Override + public void setPhoneNumber (final String phoneNumber) { + // Deligate to "hidden" object + this.getContact().setPhoneNumber(phoneNumber); + } + + @Override + public String getStreet () { + // Deligate to "hidden" object + return this.getContact().getStreet(); + } + + @Override + public void setStreet (final String street) { + // Deligate to "hidden" object + this.getContact().setStreet(street); + } + + @Override + public String getFirstName () { + // Deligate to "hidden" object + return this.getContact().getFirstName(); + } + + @Override + public void setFirstName (final String firstName) { + // Deligate to "hidden" object + this.getContact().setFirstName(firstName); + } + + @Override + public String getTranslatedGender () { + // Deligate to "hidden" object + return this.getContact().getTranslatedGender(); + } + + @Override + public Long getZipCode () { + // Deligate to "hidden" object + return this.getContact().getZipCode(); + } + + @Override + public void setZipCode (final Long zipCode) { + // Deligate to "hidden" object + this.getContact().setZipCode(zipCode); + } + + @Override + public boolean isOwnContact () { + throw new UnsupportedOperationException("Not supported yet."); //NOI18N + } + + @Override + public Iterator> iterator () throws ServletException { + try { + // Deligate to "hidden" object + return this.getContact().iterator(); + } catch (final NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + // Continue to throw + throw new ServletException(ex); + } + } + + @Override + public void show (final Client client) { + throw new UnsupportedOperationException("Not supported yet."); //NOI18N + } + + @Override + public Object getValueFromColumn (final String columnName) throws ServletException { + try { + // Deligate to "hidden" object + return this.getContact().getValueFromColumn(columnName); + } catch (final IllegalArgumentException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + // Continue to throw + throw new ServletException(ex); + } + } + + @Override + public void setValueFromColumn (final String columnName, final Object value) throws ServletException { + try { + // Deligate to "hidden" object + this.getContact().setValueFromColumn(columnName, value); + } catch (final NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { + // Continue to throw + throw new ServletException(ex); + } + } + + /** + * Setter for Contact instance + * @param contact Contact instance to set + */ + private void setContact (final Contact contact) { + this.contact = contact; + } + + /** + * Getter for Contact instance + * @return Contact instance + */ + private Contact getContact () { + return this.contact; + } +} diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/data/ShopDataBean.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/data/ShopDataBean.java index 0dbf7f5..136ee4f 100644 --- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/data/ShopDataBean.java +++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/data/ShopDataBean.java @@ -17,23 +17,19 @@ package org.mxchange.pizzaapplication.beans.data; import java.text.MessageFormat; -import java.util.LinkedList; import java.util.List; import javax.ejb.Stateful; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Named; -import org.mxchange.jcore.contact.Gender; +import org.mxchange.jcore.contact.gender.Gender; +import org.mxchange.jcore.contact.gender.GenderUtil; import org.mxchange.jshop.beans.BaseFrameworkBean; -import org.mxchange.jshop.beans.data.ShopDataBeanRemote; +import org.mxchange.jshop.beans.remote.data.ShopDataBeanRemote; /** * A bean for static data * * @author Roland Haeder */ -@Named("data") -@Stateful -@ApplicationScoped +@Stateful(name="data",mappedName = "ejb/stateful-data") public class ShopDataBean extends BaseFrameworkBean implements ShopDataBeanRemote { /** * Serial number @@ -45,23 +41,8 @@ public class ShopDataBean extends BaseFrameworkBean implements ShopDataBeanRemot // Trace message this.getLogger().trace("CALLED!"); //NOI18N - // Init list - List list = new LinkedList<>(); - - // Walk through all genders - for (final Gender gender : Gender.values()) { - // Debug log - this.getLogger().debug(MessageFormat.format("gender={0}", gender)); //NOI18N - - // Is it not UNKNOWN - if (!gender.equals(Gender.UNKNOWN)) { - // Add it - boolean added = list.add(gender); - - // Has it been added? - assert(added) : MessageFormat.format("gender {0} not added.", gender); //NOI18N - } - } + // Deligate call + List list = GenderUtil.selectableGenders(); // Trace message this.getLogger().trace(MessageFormat.format("list={0} - EXIT!", list)); //NOI18N diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/pizzaservice/PizzaServiceSessionBean.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/pizzaservice/PizzaServiceSessionBean.java index 6a7a6f2..d67ea81 100644 --- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/pizzaservice/PizzaServiceSessionBean.java +++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/beans/pizzaservice/PizzaServiceSessionBean.java @@ -19,18 +19,15 @@ package org.mxchange.pizzaapplication.beans.pizzaservice; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.sql.SQLException; -import java.text.MessageFormat; import java.util.Deque; import javax.annotation.PostConstruct; import javax.ejb.Stateless; -import javax.faces.FacesException; -import javax.inject.Named; import javax.servlet.ServletException; import org.mxchange.jcore.exceptions.BadTokenException; import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException; import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException; import org.mxchange.jshop.beans.BaseFrameworkBean; -import org.mxchange.jshop.beans.shop.ShopSessionBeanRemote; +import org.mxchange.jshop.beans.remote.shop.ShopSessionBeanRemote; import org.mxchange.jshop.category.Category; import org.mxchange.jshop.product.Product; import org.mxchange.pizzaapplication.application.PizzaApplication; @@ -41,8 +38,7 @@ import org.mxchange.pizzaapplication.application.PizzaServiceApplication; * * @author Roland Haeder */ -@Named ("shop") -@Stateless +@Stateless (name="shop", mappedName = "ejb/stateless-shop") public class PizzaServiceSessionBean extends BaseFrameworkBean implements ShopSessionBeanRemote { /** @@ -72,22 +68,16 @@ public class PizzaServiceSessionBean extends BaseFrameworkBean implements ShopSe } @PostConstruct - public void init () throws FacesException { + public void init () throws RuntimeException { // Trace message - this.getLogger().trace(MessageFormat.format("application={0} - CALLED!", this.getApplication())); //NOI18N - - // Must not be null - if (this.getApplication() == null) { - // Abort here - throw new NullPointerException("application is null"); //NOI18N - } + this.getLogger().trace("CALLED!"); //NOI18N try { // Call init method - this.app.init(this.getApplication()); + this.app.init(); } catch (final UnsupportedDatabaseBackendException | SQLException | IOException | BadTokenException ex) { // Continue to throw - throw new FacesException(ex); + throw new RuntimeException(ex); } } diff --git a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java index eff5214..a7b826a 100644 --- a/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java +++ b/PizzaService-ejb/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java @@ -17,8 +17,8 @@ package org.mxchange.pizzaapplication.tags.basket; import java.io.IOException; +import java.rmi.RemoteException; import java.text.MessageFormat; -import javax.servlet.ServletException; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; import org.apache.logging.log4j.LogManager; @@ -134,7 +134,7 @@ public class MiniBasketTag extends BodyTagSupport implements BasketTag { out.append(" \n"); //NOI18N out.append("\n"); //NOI18N } - } catch (final ServletException ex) { + } catch (final RemoteException ex) { // Continue to throw throw new JspException(ex); } diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 2f206fe..277898f 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -205,10 +205,6 @@ exists or setup the property manually. For example like this: - - - - @@ -221,7 +217,6 @@ exists or setup the property manually. For example like this: - @@ -300,7 +295,6 @@ exists or setup the property manually. For example like this: - @@ -629,10 +623,6 @@ exists or setup the property manually. For example like this: - - - - diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 67a5ece..949b84d 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=f13244bf +build.xml.data.CRC32=d066c1f0 build.xml.script.CRC32=8e3e9528 build.xml.stylesheet.CRC32=a5d15b16@1.49.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=f13244bf -nbproject/build-impl.xml.script.CRC32=8247d3f3 +nbproject/build-impl.xml.data.CRC32=d066c1f0 +nbproject/build-impl.xml.script.CRC32=ec434f5f nbproject/build-impl.xml.stylesheet.CRC32=5eea63a6@1.49.1 diff --git a/nbproject/project.properties b/nbproject/project.properties index 6489550..f42dda9 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,7 +1,6 @@ build.classes.excludes=**/*.java,**/*.form,**/.nbattrs build.dir=build build.generated.dir=${build.dir}/generated -client.module.uri=PizzaService-war client.urlPart= debug.classpath=${javac.classpath}::${jar.content.additional}:${run.classpath} display.browser=true @@ -22,7 +21,6 @@ j2ee.platform.wsit.classpath= j2ee.server.type=gfv3ee6 jar.compress=false jar.content.additional=\ - ${reference.PizzaService-war.dist-ear}:\ ${reference.PizzaService-ejb.dist-ear} jar.name=PizzaService.ear javac.debug=true @@ -33,9 +31,7 @@ meta.inf=src/conf no.dependencies=false platform.active=default_platform project.PizzaService-ejb=PizzaService-ejb -project.PizzaService-war=PizzaService-war reference.PizzaService-ejb.dist-ear=${project.PizzaService-ejb}/dist/PizzaService-ejb.jar -reference.PizzaService-war.dist-ear=${project.PizzaService-war}/dist/PizzaService-war.war resource.dir=setup run.classpath= source.root=. diff --git a/nbproject/project.xml b/nbproject/project.xml index da8c8e3..b552f0e 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -7,10 +7,6 @@ 1.6.5 - - ${reference.PizzaService-war.dist-ear} - / - ${reference.PizzaService-ejb.dist-ear} / @@ -26,14 +22,6 @@ clean-ear dist-ear - - PizzaService-war - j2ee_ear_archive - - dist-ear - clean-ear - dist-ear - -- 2.39.5