From: Roland Häder Date: Sun, 29 Oct 2017 12:42:57 +0000 (+0100) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1ded78fe531a4db8fddf04d4942e7e786f88f536;p=jjobs-war.git Please cherry-pick: - fixed JNDI names for java:module, must be: java:module/ Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/beans/business/basicdata/JobsBusinessDataWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/business/basicdata/JobsBusinessDataWebRequestBean.java index de5d555b..574e7405 100644 --- a/src/java/org/mxchange/jjobs/beans/business/basicdata/JobsBusinessDataWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/business/basicdata/JobsBusinessDataWebRequestBean.java @@ -61,7 +61,7 @@ public class JobsBusinessDataWebRequestBean extends BaseJobsBean implements Jobs /** * List of all basic company data */ - private List allBasicData; + private final List allBasicData; /** * A list of all registered companies (globally) diff --git a/src/java/org/mxchange/jjobs/converter/business/basicdata/JobsBusinessContactConverter.java b/src/java/org/mxchange/jjobs/converter/business/basicdata/JobsBusinessContactConverter.java index d036ec0f..234d0286 100644 --- a/src/java/org/mxchange/jjobs/converter/business/basicdata/JobsBusinessContactConverter.java +++ b/src/java/org/mxchange/jjobs/converter/business/basicdata/JobsBusinessContactConverter.java @@ -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 { 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 diff --git a/src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java b/src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java index 461c4f27..e69355d9 100644 --- a/src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java +++ b/src/java/org/mxchange/jjobs/converter/business/branchoffice/JobsBranchOfficeConverter.java @@ -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 { 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 } } diff --git a/src/java/org/mxchange/jjobs/converter/business/department/JobsCompanyDepartmentConverter.java b/src/java/org/mxchange/jjobs/converter/business/department/JobsCompanyDepartmentConverter.java index 37f453d9..dc4c9a26 100644 --- a/src/java/org/mxchange/jjobs/converter/business/department/JobsCompanyDepartmentConverter.java +++ b/src/java/org/mxchange/jjobs/converter/business/department/JobsCompanyDepartmentConverter.java @@ -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 { 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 diff --git a/src/java/org/mxchange/jjobs/converter/business/employee/JobsEmployeeConverter.java b/src/java/org/mxchange/jjobs/converter/business/employee/JobsEmployeeConverter.java index 16d239ff..d5eeedfe 100644 --- a/src/java/org/mxchange/jjobs/converter/business/employee/JobsEmployeeConverter.java +++ b/src/java/org/mxchange/jjobs/converter/business/employee/JobsEmployeeConverter.java @@ -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 { 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 diff --git a/src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java b/src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java index 52fac4ee..c948d6f0 100644 --- a/src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java +++ b/src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java @@ -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 { /** * 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 { 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); diff --git a/src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java b/src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java index afc327e8..b3c96182 100644 --- a/src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java +++ b/src/java/org/mxchange/jjobs/converter/contact/JobsContactConverter.java @@ -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 { 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); diff --git a/src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java b/src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java index 7ffea183..f2ffa44d 100644 --- a/src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java +++ b/src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java @@ -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 { 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 } } diff --git a/src/java/org/mxchange/jjobs/converter/fax/JobsFaxNumberConverter.java b/src/java/org/mxchange/jjobs/converter/fax/JobsFaxNumberConverter.java index f309b577..57bc385e 100644 --- a/src/java/org/mxchange/jjobs/converter/fax/JobsFaxNumberConverter.java +++ b/src/java/org/mxchange/jjobs/converter/fax/JobsFaxNumberConverter.java @@ -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 { 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 } } diff --git a/src/java/org/mxchange/jjobs/converter/landline/JobsLandLineNumberConverter.java b/src/java/org/mxchange/jjobs/converter/landline/JobsLandLineNumberConverter.java index 01bd9a21..19b8e4f6 100644 --- a/src/java/org/mxchange/jjobs/converter/landline/JobsLandLineNumberConverter.java +++ b/src/java/org/mxchange/jjobs/converter/landline/JobsLandLineNumberConverter.java @@ -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 { 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 } } diff --git a/src/java/org/mxchange/jjobs/converter/user/JobsUserConverter.java b/src/java/org/mxchange/jjobs/converter/user/JobsUserConverter.java index 71d7e7df..3ae42122 100644 --- a/src/java/org/mxchange/jjobs/converter/user/JobsUserConverter.java +++ b/src/java/org/mxchange/jjobs/converter/user/JobsUserConverter.java @@ -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 { 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); diff --git a/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsCompanyNameValidator.java b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsCompanyNameValidator.java index 33ab6438..4a477349 100644 --- a/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsCompanyNameValidator.java +++ b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsCompanyNameValidator.java @@ -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); diff --git a/src/java/org/mxchange/jjobs/validator/emailaddress/JobsEmailAddressValidator.java b/src/java/org/mxchange/jjobs/validator/emailaddress/JobsEmailAddressValidator.java index eaa01be9..cd3ecc2f 100644 --- a/src/java/org/mxchange/jjobs/validator/emailaddress/JobsEmailAddressValidator.java +++ b/src/java/org/mxchange/jjobs/validator/emailaddress/JobsEmailAddressValidator.java @@ -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); diff --git a/src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java b/src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java index f617efd3..85aacd3e 100644 --- a/src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java +++ b/src/java/org/mxchange/jjobs/validator/user/JobsUserIdValidator.java @@ -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);