]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 29 Oct 2017 12:46:43 +0000 (13:46 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 29 Oct 2017 12:46:43 +0000 (13:46 +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/financial/receipt/FinancialsReceiptConverter.java

index 157edb890f5f95275da42a1fcbd861c6574ba0b0..768cd7265fdf334261d5ee18705fbe61a688d527 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.financial.model.receipt.FinancialsReceiptWebRequestBean;
 import org.mxchange.jfinancials.beans.financial.model.receipt.FinancialsReceiptWebRequestController;
 import org.mxchange.jfinancials.exceptions.receipt.ReceiptNotFoundException;
 import org.mxchange.jfinancials.model.receipt.BillableReceipt;
@@ -51,10 +52,10 @@ public class FinancialsReceiptConverter implements Converter<BillableReceipt> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               RECEIPT_CONTROLLER = (FinancialsReceiptWebRequestController) initial.lookup("java:module/receiptController!org.mxchange.jfinancials.beans.financial.model.receipt.FinancialsReceiptWebRequestController");
+                               RECEIPT_CONTROLLER = (FinancialsReceiptWebRequestController) initial.lookup(String.format("java:module/%s", FinancialsReceiptWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
+                               throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
                        }
                }