From 5ad38f9ba12e47d905cf53f4df09a49b1e96ad52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 19 Aug 2017 22:34:31 +0200 Subject: [PATCH] Fixed JNDI names + moved converter to proper packages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../PizzaAdminBusinessDataWebRequestBean.java | 2 +- .../basicdata/PizzaBusinessDataWebSessionBean.java | 4 ++-- .../PizzaAdminCompanyEmployeeWebRequestBean.java | 2 +- .../employee/PizzaCompanyEmployeeWebRequestBean.java | 2 +- .../PizzaUserActivityWebApplicationBean.java | 2 +- .../basicdata}/PizzaBusinessContactConverter.java | 2 +- .../PizzaCompanyEmployeeConverter.java} | 12 ++++++------ 7 files changed, 13 insertions(+), 13 deletions(-) rename src/java/org/mxchange/pizzaapplication/converter/{businesscontact => business/basicdata}/PizzaBusinessContactConverter.java (98%) rename src/java/org/mxchange/{jfinancials/converter/company_employee/FinancialsCompanyEmployeeConverter.java => pizzaapplication/converter/business/company_employee/PizzaCompanyEmployeeConverter.java} (85%) diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestBean.java index 95f9b848..dfe472bf 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaAdminBusinessDataWebRequestBean.java @@ -390,7 +390,7 @@ public class PizzaAdminBusinessDataWebRequestBean extends BasePizzaController im Context context = new InitialContext(); // Try to lookup - this.adminBusinessDataBean = (AdminBusinessDataSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataAdminSessionBeanRemote"); //NOI18N + this.adminBusinessDataBean = (AdminBusinessDataSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataAdminSessionBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw again throw new FaceletException(e); diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionBean.java index 1ac9e313..ece9cf27 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebSessionBean.java @@ -304,10 +304,10 @@ public class PizzaBusinessDataWebSessionBean extends BasePizzaController impleme Context context = new InitialContext(); // Try to lookup - this.businessDataBean = (BusinessDataSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N + this.businessDataBean = (BusinessDataSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/businessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote"); //NOI18N // Try to lookup - this.adminBusinessDataBean = (AdminBusinessDataSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataAdminSessionBeanRemote"); //NOI18N + this.adminBusinessDataBean = (AdminBusinessDataSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.basicdata.BusinessDataAdminSessionBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw again throw new FaceletException(e); diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestBean.java index 8ca9eb0a..b86cf11d 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaAdminCompanyEmployeeWebRequestBean.java @@ -64,7 +64,7 @@ public class PizzaAdminCompanyEmployeeWebRequestBean extends BasePizzaController Context context = new InitialContext(); // Try to lookup - this.adminCompanyEmployeeBean = (AdminCompanyEmployeeSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.AdminCompanyEmployeeSessionBeanRemote"); //NOI18N + this.adminCompanyEmployeeBean = (AdminCompanyEmployeeSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.AdminCompanyEmployeeSessionBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw again throw new FaceletException(e); diff --git a/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java index 82c5adf4..e6ec7229 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java @@ -85,7 +85,7 @@ public class PizzaCompanyEmployeeWebRequestBean extends BasePizzaController impl Context context = new InitialContext(); // Try to lookup - this.companyEmployeeBean = (CompanyEmployeeSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N + this.companyEmployeeBean = (CompanyEmployeeSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.CompanyEmployeeSessionBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw again throw new FaceletException(e); diff --git a/src/java/org/mxchange/pizzaapplication/beans/user/activity/PizzaUserActivityWebApplicationBean.java b/src/java/org/mxchange/pizzaapplication/beans/user/activity/PizzaUserActivityWebApplicationBean.java index c6497085..27fa7d9b 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/user/activity/PizzaUserActivityWebApplicationBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/user/activity/PizzaUserActivityWebApplicationBean.java @@ -557,7 +557,7 @@ public class PizzaUserActivityWebApplicationBean extends BasePizzaController imp Context context = new InitialContext(); // Try to lookup - this.userActivityBean = (UserActivityLogSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/userActivity!org.mxchange.jusercore.model.user.activity.UserActivityLogSessionBeanRemote"); //NOI18N + this.userActivityBean = (UserActivityLogSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/userActivity!org.mxchange.jusercore.model.user.activity.UserActivityLogSessionBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw again throw new FaceletException(e); diff --git a/src/java/org/mxchange/pizzaapplication/converter/businesscontact/PizzaBusinessContactConverter.java b/src/java/org/mxchange/pizzaapplication/converter/business/basicdata/PizzaBusinessContactConverter.java similarity index 98% rename from src/java/org/mxchange/pizzaapplication/converter/businesscontact/PizzaBusinessContactConverter.java rename to src/java/org/mxchange/pizzaapplication/converter/business/basicdata/PizzaBusinessContactConverter.java index 74017aae..e3d15d55 100644 --- a/src/java/org/mxchange/pizzaapplication/converter/businesscontact/PizzaBusinessContactConverter.java +++ b/src/java/org/mxchange/pizzaapplication/converter/business/basicdata/PizzaBusinessContactConverter.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.pizzaapplication.converter.businesscontact; +package org.mxchange.pizzaapplication.converter.business.basicdata; import java.text.MessageFormat; import javax.faces.component.UIComponent; diff --git a/src/java/org/mxchange/jfinancials/converter/company_employee/FinancialsCompanyEmployeeConverter.java b/src/java/org/mxchange/pizzaapplication/converter/business/company_employee/PizzaCompanyEmployeeConverter.java similarity index 85% rename from src/java/org/mxchange/jfinancials/converter/company_employee/FinancialsCompanyEmployeeConverter.java rename to src/java/org/mxchange/pizzaapplication/converter/business/company_employee/PizzaCompanyEmployeeConverter.java index 645fc220..f7283561 100644 --- a/src/java/org/mxchange/jfinancials/converter/company_employee/FinancialsCompanyEmployeeConverter.java +++ b/src/java/org/mxchange/pizzaapplication/converter/business/company_employee/PizzaCompanyEmployeeConverter.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.jfinancials.converter.company_employee; +package org.mxchange.pizzaapplication.converter.business.company_employee; import java.text.MessageFormat; import javax.faces.component.UIComponent; @@ -35,7 +35,7 @@ import org.mxchange.jcontactsbusiness.exceptions.employee.CompanyEmployeeNotFoun * @author Roland Häder */ @FacesConverter (value = "CompanyEmployeeConverter") -public class FinancialsCompanyEmployeeConverter implements Converter { +public class PizzaCompanyEmployeeConverter implements Converter { /** * CompanyEmployee EJB @@ -45,7 +45,7 @@ public class FinancialsCompanyEmployeeConverter implements Converter { /** * Default constructor */ - public FinancialsCompanyEmployeeConverter () { + public PizzaCompanyEmployeeConverter () { } @Override @@ -61,14 +61,14 @@ public class FinancialsCompanyEmployeeConverter implements Converter { // Is the bean there? // @TODO Requires this synchronization or is it (sync) confusing the container? - if (null == FinancialsCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN) { + if (null == PizzaCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN) { // Try to get it try { // Get initial context Context initialContext = new InitialContext(); // ... and user controller - FinancialsCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initialContext.lookup("java:global/jfinancials-ejb/companyEmployee!org.mxchange.jcontactsbusiness.company_employee.CompanyEmployeeSessionBeanRemote"); //NOI18N + PizzaCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN = (CompanyEmployeeSessionBeanRemote) initialContext.lookup("java:global/pizzaservice-ejb/companyEmployee!org.mxchange.jcontactsbusiness.company_employee.CompanyEmployeeSessionBeanRemote"); //NOI18N } catch (final NamingException ex) { // Continue to throw it throw new ConverterException(MessageFormat.format("initialContext.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N @@ -83,7 +83,7 @@ public class FinancialsCompanyEmployeeConverter implements Converter { Long employeeId = Long.valueOf(submittedValue); // Try to get user instance from it - companyEmployee = FinancialsCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN.findCompanyEmployeeById(employeeId); + companyEmployee = PizzaCompanyEmployeeConverter.COMPANY_EMPLOYEE_BEAN.findCompanyEmployeeById(employeeId); } catch (final NumberFormatException ex) { // Throw again throw new ConverterException(ex); -- 2.39.5