]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 29 Oct 2017 12:42:57 +0000 (13:42 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 21 Jul 2019 05:06:27 +0000 (07:06 +0200)
- fixed JNDI names for java:module, must be: java:module/<SimpleClassName>

Signed-off-by: Roland Häder <roland@mxchange.org>
16 files changed:
src/java/org/mxchange/jjobs/beans/business/basicdata/JobsBusinessDataWebRequestBean.java
src/java/org/mxchange/jjobs/converter/business/basicdata/JobsBusinessContactConverter.java
src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java
src/java/org/mxchange/jjobs/converter/business/department/JobsCompanyDepartmentConverter.java
src/java/org/mxchange/jjobs/converter/business/employee/JobsEmployeeConverter.java
src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java
src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java
src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java
src/java/org/mxchange/jjobs/converter/fax/JobsFaxNumberConverter.java
src/java/org/mxchange/jjobs/converter/landline/JobsLandLineNumberConverter.java
src/java/org/mxchange/jjobs/converter/mobile/JobsMobileNumberConverter.java
src/java/org/mxchange/jjobs/converter/mobileprovider/JobsMobileProviderConverter.java
src/java/org/mxchange/jjobs/converter/user/JobsUserConverter.java
src/java/org/mxchange/jjobs/validator/business/basicdata/JobsCompanyNameValidator.java
src/java/org/mxchange/jjobs/validator/emailaddress/JobsEmailAddressValidator.java
src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java

index de5d555b86b0f823c1c79bb2ddb5448af729580b..574e7405b2a446e82e1dddc79c601675d9b5c2ba 100644 (file)
@@ -61,7 +61,7 @@ public class JobsBusinessDataWebRequestBean extends BaseJobsBean implements Jobs
        /**
         * List of all basic company data
         */
-       private List<BasicData> allBasicData;
+       private final List<BasicData> allBasicData;
 
        /**
         * A list of all registered companies (globally)
index d036ec0fba419bdd52f5fffad129c88ae597c066..234d0286e885761fb1a8bec753efdb086acfaaa6 100644 (file)
@@ -28,6 +28,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicDataNotFoundException;
 import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
+import org.mxchange.jjobs.beans.business.basicdata.JobsBusinessDataWebRequestBean;
 import org.mxchange.jjobs.beans.business.basicdata.JobsBusinessDataWebRequestController;
 
 /**
@@ -52,7 +53,7 @@ public class JobsBasicCompanyDataConverter implements Converter<BasicData> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               BASIC_DATA_CONTROLLER = (JobsBusinessDataWebRequestController) initial.lookup("java:module/basicCompanyDataController!org.mxchange.jjobs.beans.business.basicdata.JobsBusinessDataWebRequestController"); //NOI18N
+                               BASIC_DATA_CONTROLLER = (JobsBusinessDataWebRequestController) initial.lookup(String.format("java:module/%s", JobsBusinessDataWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
index 461c4f272e6915a3cd5fb46efb60cfb2f38eac00..e69355d928aafb90641b917a8704e65d8b0e2f7e 100644 (file)
@@ -28,6 +28,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontactsbusiness.exceptions.branchoffice.BranchOfficeNotFoundException;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
+import org.mxchange.jjobs.beans.business.branchoffice.JobsBranchOfficeWebRequestBean;
 import org.mxchange.jjobs.beans.business.branchoffice.JobsBranchOfficeWebRequestController;
 
 /**
@@ -52,10 +53,10 @@ public class JobsBranchOfficeConverter implements Converter<BranchOffice> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               BRANCH_OFFICE_CONTROLLER = (JobsBranchOfficeWebRequestController) initial.lookup("java:module/branchOfficeController!org.mxchange.jjobs.beans.business.branchoffice.JobsBranchOfficeWebRequestController");
+                               BRANCH_OFFICE_CONTROLLER = (JobsBranchOfficeWebRequestController) initial.lookup(String.format("java:module/%s", JobsBranchOfficeWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
                        }
                }
 
index 37f453d9441d14e5cc14c98916396bb0cb93cad3..dc4c9a2686df70912dc7c2a43173cb864ff28a83 100644 (file)
@@ -28,6 +28,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontactsbusiness.exceptions.department.DepartmentNotFoundException;
 import org.mxchange.jcontactsbusiness.model.department.Department;
+import org.mxchange.jjobs.beans.business.department.JobsDepartmentWebRequestBean;
 import org.mxchange.jjobs.beans.business.department.JobsDepartmentWebRequestController;
 
 /**
@@ -52,7 +53,7 @@ public class JobsDepartmentConverter implements Converter<Department> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               DEPARTMENT_CONTROLLER = (JobsDepartmentWebRequestController) initial.lookup("java:module/departmentController!org.mxchange.jjobs.beans.business.department.JobsDepartmentWebRequestController"); //NOI18N
+                               DEPARTMENT_CONTROLLER = (JobsDepartmentWebRequestController) initial.lookup(String.format("java:module/%s", JobsDepartmentWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
index 16d239ffd1ba1edc4ac50d74081d0d7e90e0cdd3..d5eeedfe60782e16bba5cc0091ee4cf6c7050090 100644 (file)
@@ -28,6 +28,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontactsbusiness.exceptions.employee.EmployeeNotFoundException;
 import org.mxchange.jcontactsbusiness.model.employee.Employable;
+import org.mxchange.jjobs.beans.business.employee.JobsEmployeeWebRequestBean;
 import org.mxchange.jjobs.beans.business.employee.JobsEmployeeWebRequestController;
 
 /**
@@ -52,7 +53,7 @@ public class JobsEmployeeConverter implements Converter<Employable> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               EMPLOYEE_CONTROLLER = (JobsEmployeeWebRequestController) initial.lookup("java:module/!.JobsEmployeeWebRequestController"); //NOI18N
+                               EMPLOYEE_CONTROLLER = (JobsEmployeeWebRequestController) initial.lookup(String.format("java:module/%s", JobsEmployeeWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
index 52fac4ee2a7af3f31747a96f3a0226af0167c78d..c948d6f0b720210c029907a6d9bc685923d66352 100644 (file)
@@ -28,6 +28,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontactsbusiness.exceptions.opening_time.OpeningTimeNotFoundException;
 import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
+import org.mxchange.jjobs.beans.business.opening_time.JobsOpeningTimeWebRequestBean;
 import org.mxchange.jjobs.beans.business.opening_time.JobsOpeningTimeWebRequestController;
 
 /**
@@ -41,18 +42,18 @@ public class JobsCompanyOpeningTimeConverter implements Converter<OpeningTime> {
        /**
         * Opening time backing bean
         */
-       private static JobsOpeningTimeWebRequestController DEPARTMENT_CONTROLLER;
+       private static JobsOpeningTimeWebRequestController OPENING_TIMES_CONTROLLER;
 
        @Override
        public OpeningTime getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
                // Is the instance there?
-               if (DEPARTMENT_CONTROLLER == null) {
+               if (OPENING_TIMES_CONTROLLER == null) {
                        try {
                                // Not yet, attempt lookup
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               DEPARTMENT_CONTROLLER = (JobsOpeningTimeWebRequestController) initial.lookup("java:module/openingTimeController!org.mxchange.jjobs.beans.business.opening_time.JobsOpeningTimeWebRequestController"); //NOI18N
+                               OPENING_TIMES_CONTROLLER = (JobsOpeningTimeWebRequestController) initial.lookup(String.format("java:module/%s", JobsOpeningTimeWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
@@ -76,7 +77,7 @@ public class JobsCompanyOpeningTimeConverter implements Converter<OpeningTime> {
                        final Long openingId = Long.valueOf(submittedValue);
 
                        // Try to get user instance from it
-                       openingTime = DEPARTMENT_CONTROLLER.findOpeningTimeById(openingId);
+                       openingTime = OPENING_TIMES_CONTROLLER.findOpeningTimeById(openingId);
                } catch (final NumberFormatException ex) {
                        // Throw again
                        throw new ConverterException(ex);
index afc327e8d0551a390793dfed4c3fea1f01692c31..b3c961828ddb829ae61aad8244e8674b5a5a19ef 100644 (file)
@@ -28,6 +28,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jjobs.beans.contact.JobsContactWebRequestBean;
 import org.mxchange.jjobs.beans.contact.JobsContactWebRequestController;
 
 /**
@@ -52,7 +53,7 @@ public class JobsContactConverter implements Converter<Contact> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               CONTACT_CONTROLLER = (JobsContactWebRequestController) initial.lookup("java:module/contactController!org.mxchange.jjobs.beans.contact.JobsContactWebRequestController");
+                               CONTACT_CONTROLLER = (JobsContactWebRequestController) initial.lookup(String.format("java:module/%s", JobsContactWebRequestBean.class.getSimpleName()));
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
index 7ffea183d3dad50c9f1e0af458a0648dfb2c56ed..f2ffa44dc5a9171dd6cdce40266ab77c484db22f 100644 (file)
@@ -28,6 +28,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcountry.exceptions.CountryNotFoundException;
 import org.mxchange.jcountry.model.data.Country;
+import org.mxchange.jjobs.beans.country.JobsCountryWebRequestBean;
 import org.mxchange.jjobs.beans.country.JobsCountryWebRequestController;
 
 /**
@@ -52,10 +53,10 @@ public class JobsCountryConverter implements Converter<Country> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               COUNTRY_CONTROLLER = (JobsCountryWebRequestController) initial.lookup("java:module/countryController!org.mxchange.jjobs.beans.country.JobsCountryWebRequestController");
+                               COUNTRY_CONTROLLER = (JobsCountryWebRequestController) initial.lookup(String.format("java:module/%s", JobsCountryWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
                        }
                }
 
index f309b577b3d0132ec70cfd58d48c2bba1ced92e8..57bc385e2e5e25e443c9e5321fbf30d3151999f2 100644 (file)
@@ -26,6 +26,7 @@ import javax.faces.validator.ValidatorException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.jjobs.beans.phone.JobsPhoneWebRequestBean;
 import org.mxchange.jjobs.beans.phone.JobsPhoneWebRequestController;
 import org.mxchange.jphone.exceptions.phone.PhoneEntityNotFoundException;
 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
@@ -52,10 +53,10 @@ public class JobsFaxNumberConverter implements Converter<DialableFaxNumber> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               PHONE_CONTROLLER = (JobsPhoneWebRequestController) initial.lookup("java:module/phoneController!org.mxchange.jphone.model.phonenumbers.phone.JobsPhoneWebRequestController");
+                               PHONE_CONTROLLER = (JobsPhoneWebRequestController) initial.lookup(String.format("java:module/%s", JobsPhoneWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
                        }
                }
 
index 01bd9a21812b14ebb5995ebbf8fccd6d530f3d12..19b8e4f6bb493805182046a8b6650601c3004430 100644 (file)
@@ -26,6 +26,7 @@ import javax.faces.validator.ValidatorException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.jjobs.beans.phone.JobsPhoneWebRequestBean;
 import org.mxchange.jjobs.beans.phone.JobsPhoneWebRequestController;
 import org.mxchange.jphone.exceptions.phone.PhoneEntityNotFoundException;
 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
@@ -52,10 +53,10 @@ public class JobsLandLineNumberConverter implements Converter<DialableLandLineNu
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               PHONE_CONTROLLER = (JobsPhoneWebRequestController) initial.lookup("java:module/phoneController!org.mxchange.jphone.model.phonenumbers.phone.JobsPhoneWebRequestController");
+                               PHONE_CONTROLLER = (JobsPhoneWebRequestController) initial.lookup(String.format("java:module/%s", JobsPhoneWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
-                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
+                               throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex); //NOI18N
                        }
                }
 
index 54f6cba19ec271494757463b632866f9ea80afcb..fe71466336d207258e5ee58755b84317feaa8893 100644 (file)
@@ -26,6 +26,7 @@ import javax.faces.validator.ValidatorException;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.jjobs.beans.phone.JobsPhoneWebRequestBean;
 import org.mxchange.jjobs.beans.phone.JobsPhoneWebRequestController;
 import org.mxchange.jphone.exceptions.phone.PhoneEntityNotFoundException;
 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
@@ -52,7 +53,7 @@ public class JobsMobileNumberConverter implements Converter<DialableMobileNumber
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               PHONE_CONTROLLER = (JobsPhoneWebRequestController) initial.lookup("java:module/phoneController!org.mxchange.jjobs.beans.phone.JobsPhoneWebRequestController");
+                               PHONE_CONTROLLER = (JobsPhoneWebRequestController) initial.lookup(String.format("java:module/%s", JobsPhoneWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
index 484877ad06ae4de4b364b88a36c67e55b4f8c826..3bae146462cb42579f48b44d1721a2e908800305 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.jjobs.beans.mobileprovider.JobsMobileProviderWebRequestBean;
 import org.mxchange.jjobs.beans.mobileprovider.JobsMobileProviderWebRequestController;
 import org.mxchange.jphone.exceptions.mobileprovider.MobileProviderNotFoundException;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
@@ -51,10 +52,10 @@ public class JobsMobileProviderConverter implements Converter<MobileProvider> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               MOBILE_PROVIDER_CONTROLLER = (JobsMobileProviderWebRequestController) initial.lookup("java:module/mobileProviderController!org.mxchange.jjobs.beans.mobileprovider.JobsMobileProviderWebRequestController");
+                               MOBILE_PROVIDER_CONTROLLER = (JobsMobileProviderWebRequestController) initial.lookup(String.format("java:module/%s", JobsMobileProviderWebRequestBean.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
                        }
                }
 
index 71d7e7dfd305a1cf35286afedf131bb5c310ef48..3ae421222eeae824d7485919869c691ef6275502 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.jjobs.beans.user.JobsUserWebRequestBean;
 import org.mxchange.jjobs.beans.user.JobsUserWebRequestController;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.model.user.User;
@@ -51,7 +52,7 @@ public class JobsUserConverter implements Converter<User> {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               USER_CONTROLLER = (JobsUserWebRequestController) initial.lookup("java:module/userController!org.mxchange.jjobs.beans.user.JobsUserWebRequestController");
+                               USER_CONTROLLER = (JobsUserWebRequestController) initial.lookup(String.format("java:module/%s", JobsUserWebRequestBean.class.getSimpleName()));
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
index 33ab6438ea311367bab5bdfbe9ba12576bfac023..4a47734931c2fc1ee77c528b091f1b5d248289a8 100644 (file)
@@ -26,6 +26,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.validator.string.BaseStringValidator;
+import org.mxchange.jjobs.beans.business.basicdata.JobsBusinessDataWebRequestBean;
 import org.mxchange.jjobs.beans.business.basicdata.JobsBusinessDataWebRequestController;
 
 /**
@@ -55,7 +56,7 @@ public class JobsCompanyNameValidator extends BaseStringValidator {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               BASIC_DATA_CONTROLLER = (JobsBusinessDataWebRequestController) initial.lookup("java:module/basicCompanyDataController!org.mxchange.jjobs.beans.business.basicdata.JobsBusinessDataWebRequestController"); //NOI18N
+                               BASIC_DATA_CONTROLLER = (JobsBusinessDataWebRequestController) initial.lookup(String.format("java:module/%s", JobsBusinessDataWebRequestBean.class.getSimpleName())); //NOI18N
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
index eaa01be9d6d82d121a84dd60b3394b234d989b14..cd3ecc2fd008ef289a56b02e3131364317a189dd 100644 (file)
@@ -27,6 +27,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.validator.string.BaseStringValidator;
+import org.mxchange.jjobs.beans.contact.JobsContactWebRequestBean;
 import org.mxchange.jjobs.beans.contact.JobsContactWebRequestController;
 
 /**
@@ -66,7 +67,7 @@ public class JobsEmailAddressValidator extends BaseStringValidator {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               CONTACT_CONTROLLER = (JobsContactWebRequestController) initial.lookup("java:module/contactController!org.mxchange.jjobs.beans.contact.JobsContactWebRequestController");
+                               CONTACT_CONTROLLER = (JobsContactWebRequestController) initial.lookup(String.format("java:module/%s", JobsContactWebRequestBean.class.getSimpleName()));
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
index f617efd3889527f3f5ac6cd3302349eaf1013388..85aacd3e93fb2b0d7417b994023fd48c4f7237f4 100644 (file)
@@ -26,6 +26,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.validator.number.BaseNumberValidator;
+import org.mxchange.jjobs.beans.user.JobsUserWebRequestBean;
 import org.mxchange.jjobs.beans.user.JobsUserWebRequestController;
 
 /**
@@ -55,7 +56,7 @@ public class JobsUserIdValidator extends BaseNumberValidator {
                                final Context initial = new InitialContext();
 
                                // Lookup EJB
-                               USER_CONTROLLER = (JobsUserWebRequestController) initial.lookup("java:module/userController!org.mxchange.jjobs.beans.user.JobsUserWebRequestController");
+                               USER_CONTROLLER = (JobsUserWebRequestController) initial.lookup(String.format("java:module/%s", JobsUserWebRequestBean.class.getSimpleName()));
                        } catch (final NamingException ex) {
                                // Throw it again
                                throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);