]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Maybe cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 29 Oct 2017 12:45:30 +0000 (13:45 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 29 Oct 2017 12:45:30 +0000 (13:45 +0100)
- fixed JNDI name, has to be: java:module/<SimpleClassName>

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java

index 85124148136838ef96144709a283c1a25d1995e7..a1753d0b1f61256c58b74fcd8ee4a025b1c4422e 100644 (file)
@@ -25,6 +25,7 @@ import javax.faces.convert.FacesConverter;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.jfinancials.beans.category.FinancialCategoryWebRequestBean;
 import org.mxchange.jfinancials.beans.category.FinancialCategoryWebRequestController;
 import org.mxchange.jproduct.exceptions.category.CategoryNotFoundException;
 import org.mxchange.jproduct.model.category.Category;
@@ -51,7 +52,7 @@ public class FinancialsProductCategoryConverter implements Converter<Category> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               CATEGORY_CONTROLLER = (FinancialCategoryWebRequestController) initial.lookup("java:module/categoryController!org.mxchange.jfinancials.beans.category.FinancialCategoryWebRequestController");
+                               CATEGORY_CONTROLLER = (FinancialCategoryWebRequestController) initial.lookup(String.format("java:module/%s", FinancialCategoryWebRequestBean.class.getSimpleName()));
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);