]> git.mxchange.org Git - jjobs-war.git/blobdiff - src/java/org/mxchange/jjobs/converter/landline/JobsLandLineNumberConverter.java
Please cherry-pick:
[jjobs-war.git] / src / java / org / mxchange / jjobs / converter / landline / JobsLandLineNumberConverter.java
index fe72af86a4caffdee251832ae3f61cca59ced1d3..01bd9a21812b14ebb5995ebbf8fccd6d530f3d12 100644 (file)
@@ -26,9 +26,9 @@ import javax.faces.validator.ValidatorException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;
+import org.mxchange.jjobs.beans.phone.JobsPhoneWebRequestController;
+import org.mxchange.jphone.exceptions.phone.PhoneEntityNotFoundException;
 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.model.phonenumbers.phone.PhoneSessionBeanRemote;
 
 /**
  * Converter for land-line id <-> valid land-line number instance
@@ -41,21 +41,21 @@ public class JobsLandLineNumberConverter implements Converter<DialableLandLineNu
        /**
         * Phone EJB
         */
-       private static PhoneSessionBeanRemote PHONE_BEAN;
+       private static JobsPhoneWebRequestController PHONE_CONTROLLER;
 
        @Override
        public DialableLandLineNumber getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
                // Is the instance there?
-               if (PHONE_BEAN == null) {
+               if (PHONE_CONTROLLER == null) {
                        try {
                                // Not yet, attempt lookup
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               PHONE_BEAN = (PhoneSessionBeanRemote) initial.lookup("java:global/jjobs-ejb/phone!org.mxchange.jphone.model.phonenumbers.phone.PhoneSessionBeanRemote");
+                               PHONE_CONTROLLER = (JobsPhoneWebRequestController) initial.lookup("java:module/phoneController!org.mxchange.jphone.model.phonenumbers.phone.JobsPhoneWebRequestController");
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup EJB", ex.getMessage()), ex);
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
                        }
                }
 
@@ -76,7 +76,7 @@ public class JobsLandLineNumberConverter implements Converter<DialableLandLineNu
                        final Long landLineNumberId = Long.valueOf(submittedValue);
 
                        // Try to get mobile instance from it
-                       landLineNumber = PHONE_BEAN.findLandLineNumberById(landLineNumberId);
+                       landLineNumber = PHONE_CONTROLLER.findLandLineNumberById(landLineNumberId);
                } catch (final NumberFormatException ex) {
                        // Throw again
                        throw new ConverterException(ex);