]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Used global, portable JNDI names for all beans
authorRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 11:18:54 +0000 (13:18 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 11:18:54 +0000 (13:18 +0200)
src/java/org/mxchange/jshopcore/model/category/PizzaCategoryConverter.java
src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/category/PizzaAdminCategoryWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/product/PizzaAdminProductWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/receipt/PizzaReceiptWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/shop/PizzaShopWebApplicationBean.java
src/java/org/mxchange/pizzaapplication/servlet/receipt/PizzaPdfReceiptServlet.java

index 30769b0a2603677de721f6ab857b6a2e43fdd888..f0f1c6298d1783965381f06dd2f270537a618dfd 100644 (file)
@@ -57,6 +57,9 @@ public class PizzaCategoryConverter implements Converter {
                        // Get initial context
                        Context context = new InitialContext();
 
+                       // Lookup category bean
+                       this.categoryBean = (CategorySessionBeanRemote) context.lookup("java:global/jshop-ejb/category, java:global/jshop-ejb/category!org.mxchange.jshopcore.model.category.CategorySessionBeanRemote"); //NOI18N
+
                        // Lookup logger
                        this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
                } catch (final NamingException ex) {
index be0855123d4e2b9c23b96cc6e5d340d03cf17905..7093a3f3730b55838fb7888858e226fe8266804e 100644 (file)
@@ -80,7 +80,7 @@ public class PizzaBasketWebSessionBean implements PizzaBasketWebSessionControlle
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.basketBean = (BasketSessionBeanRemote) context.lookup("ejb/stateless-basket"); //NOI18N
+                       this.basketBean = (BasketSessionBeanRemote) context.lookup("java:global/jshop-ejb/basket, java:global/jshop-ejb/basket!org.mxchange.jshopcore.model.basket.BasketSessionBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw
                        throw new FaceletException(ex);
index 67622e0ef0551db74c9b81dc0ca3c470effc4119..e1a067bc6cf97a58d411cb889d353055585e4215 100644 (file)
@@ -78,7 +78,7 @@ public class PizzaAdminCategoryWebRequestBean implements PizzaAdminCategoryWebRe
                        Context context = new InitialContext();
 
                        // Try to lookup the bean
-                       this.categoryBean = (AdminCategorySessionBeanRemote) context.lookup("ejb/stateless-admin-category"); //NOI18N
+                       this.categoryBean = (AdminCategorySessionBeanRemote) context.lookup("java:global/jshop-ejb/admin_category!org.mxchange.jshopcore.model.category.AdminCategorySessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw it again
                        throw new FaceletException(e);
index 5a052a7b2228e86a8ef2f05934f71a41c0828fe0..494b9d94a0ed859c23163c7009f849dc6b92ff0f 100644 (file)
@@ -131,7 +131,7 @@ public class PizzaCustomerWebSessionBean implements PizzaCustomerWebSessionContr
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.customerBean = (CustomerSessionBeanRemote) context.lookup("ejb/stateless-customer");
+                       this.customerBean = (CustomerSessionBeanRemote) context.lookup("java:global/jshop-ejb/shopCustomer, java:global/jshop-ejb/shopCustomer!org.mxchange.jcustomercore.model.customer.CustomerSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
index 17d8bd9e1499f6d2626ee10c371429df87b4b25a..b8ebc234097eb87b13942e296e37b55689bc85dd 100644 (file)
@@ -90,7 +90,7 @@ public class PizzaAdminProductWebRequestBean implements PizzaAdminProductWebRequ
                        Context context = new InitialContext();
 
                        // Try to lookup the bean
-                       this.productRemoteBean = (AdminProductSessionBeanRemote) context.lookup("ejb/stateless-admin-product"); //NOI18N
+                       this.productRemoteBean = (AdminProductSessionBeanRemote) context.lookup("java:global/jshop-ejb/admin_product, java:global/jshop-ejb/admin_product!org.mxchange.jshopcore.model.product.AdminProductSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw it again
                        throw new FaceletException(e);
index 662d4f8ecf3dd8457ec5628cae9fe7775ec305a4..5ed9f623c2f0cb1675a91641e48f21d2def41fb5 100644 (file)
@@ -58,7 +58,7 @@ public class PizzaReceiptWebSessionBean implements PizzaReceiptWebSessionControl
                        Context context = new InitialContext();
 
                        // Get factory from JMS resource
-                       this.receiptBean = (ReceiptBeanRemote) context.lookup("ejb/stateless-receipt");
+                       this.receiptBean = (ReceiptBeanRemote) context.lookup("java:global/jshop-ejb/pdf!org.mxchange.jshopcore.model.receipt.ReceiptBeanRemote");
                } catch (final NamingException e) {
                        // Continued to throw
                        throw new FacesException(e);
index f0e5333034ffaa3c7f41c5c5d324713c60b28f53..217fbbddb31b65c35a81d982812f5cc34aea0998 100644 (file)
@@ -104,13 +104,13 @@ public class PizzaShopWebApplicationBean implements PizzaShopWebApplicationContr
                        Context context = new InitialContext();
 
                        // Try to lookup the bean
-                       CategorySessionBeanRemote categoryBean = (CategorySessionBeanRemote) context.lookup("ejb/stateless-category"); //NOI18N
+                       CategorySessionBeanRemote categoryBean = (CategorySessionBeanRemote) context.lookup("java:global/jshop-ejb/category, java:global/jshop-ejb/category!org.mxchange.jshopcore.model.category.CategorySessionBeanRemote"); //NOI18N
 
                        // Get all categories
                        this.categories = categoryBean.getAllCategories();
 
                        // Try to lookup the bean
-                       ProductSessionBeanRemote productBean = (ProductSessionBeanRemote) context.lookup("ejb/stateless-product"); //NOI18N
+                       ProductSessionBeanRemote productBean = (ProductSessionBeanRemote) context.lookup("java:global/jshop-ejb/product!org.mxchange.jshopcore.model.product.ProductSessionBeanRemote"); //NOI18N
 
                        // Get available products list
                        this.availableProducts = productBean.getAvailableProducts();
index 3d374cdb882a5b6803a63ca95e41561610a205bd..464e2241a58e8f3e6bc6bbf375c33255bdbb0d5a 100644 (file)
@@ -55,7 +55,7 @@ public class PizzaPdfReceiptServlet extends HttpServlet {
                        Context context = new InitialContext();
 
                        // Set instance
-                       this.receiptBean = (ReceiptBeanRemote) context.lookup("ejb/pdf-receipt"); //NOI18N
+                       this.receiptBean = (ReceiptBeanRemote) context.lookup("java:global/jshop-ejb/pdf!org.mxchange.jshopcore.model.receipt.ReceiptBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);