]> git.mxchange.org Git - jfinancials-war.git/commitdiff
converters don't have a postconstruct possiblity and no injections/EJBs. So you need...
authorRoland Haeder <roland@mxchange.org>
Mon, 15 Feb 2016 18:54:16 +0000 (19:54 +0100)
committerRoland Haeder <roland@mxchange.org>
Mon, 15 Feb 2016 18:54:16 +0000 (19:54 +0100)
src/java/org/mxchange/addressbook/converter/country/CountryConverter.java
src/java/org/mxchange/addressbook/converter/smsprovider/SmsProviderConverter.java
src/java/org/mxchange/addressbook/converter/user/UserConverter.java

index 6606143d2ac5edce433212d00859d5c3ac188e63..a70df8ceab982b9276a263af5d62b7454c1d7244 100644 (file)
@@ -19,18 +19,16 @@ package org.mxchange.addressbook.converter.country;
 import java.text.MessageFormat;
 import java.util.List;
 import java.util.Objects;
-import javax.annotation.PostConstruct;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.FacesConverter;
-import javax.inject.Inject;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import org.mxchange.addressbook.beans.country.CountryWebApplicationController;
 import org.mxchange.jcoreeelogger.beans.local.logger.Log;
 import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote;
 import org.mxchange.jcountry.data.Country;
 
 /**
@@ -44,8 +42,7 @@ public class CountryConverter implements Converter {
        /**
         * Country bean
         */
-       @Inject
-       private CountryWebApplicationController countryController;
+       private AddressbookCountrySingletonBeanRemote countryController;
 
        /**
         * Logger instance
@@ -120,8 +117,7 @@ public class CountryConverter implements Converter {
        /**
         * Initialization of this converter
         */
-       @PostConstruct
-       public void init () {
+       public CountryConverter () {
                // Try to get it
                try {
                        // Get initial context
@@ -129,6 +125,9 @@ public class CountryConverter implements Converter {
 
                        // Lookup logger
                        this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       // ... and country controller
+                       this.countryController = (AddressbookCountrySingletonBeanRemote) context.lookup("java:global/addressbook-ejb/country!org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
                        throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
index 0769fb534ecf5e695d4a021f1e4d33c75ea5a71d..464c113e46cf7441303d810e6bf3ff686e780856 100644 (file)
@@ -19,18 +19,16 @@ package org.mxchange.addressbook.converter.smsprovider;
 import java.text.MessageFormat;
 import java.util.List;
 import java.util.Objects;
-import javax.annotation.PostConstruct;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.FacesConverter;
-import javax.inject.Inject;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import org.mxchange.addressbook.beans.smsprovider.SmsProviderWebApplicationController;
 import org.mxchange.jcoreeelogger.beans.local.logger.Log;
 import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+import org.mxchange.jphone.phonenumbers.smsprovider.AddressbookSmsProviderSingletonBeanRemote;
 import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider;
 
 /**
@@ -50,8 +48,7 @@ public class SmsProviderConverter implements Converter {
        /**
         * SMS provider bean
         */
-       @Inject
-       private SmsProviderWebApplicationController providerController;
+       private AddressbookSmsProviderSingletonBeanRemote providerController;
 
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
@@ -120,8 +117,7 @@ public class SmsProviderConverter implements Converter {
        /**
         * Initialization of this converter
         */
-       @PostConstruct
-       public void init () {
+       public SmsProviderConverter () {
                // Try to get it
                try {
                        // Get initial context
@@ -129,6 +125,9 @@ public class SmsProviderConverter implements Converter {
 
                        // Lookup logger
                        this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       /// and SMS provider controller
+                       this.providerController = (AddressbookSmsProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.AddressbookSmsProviderSingletonBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
                        throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
index d5e7769400ab21b2beec1c026940f465b3a05278..2b2c2f2be6e93b5b9a55dfe284120dc2da552118 100644 (file)
 package org.mxchange.addressbook.converter.user;
 
 import java.text.MessageFormat;
-import javax.annotation.PostConstruct;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
 import javax.faces.convert.FacesConverter;
-import javax.inject.Inject;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
@@ -50,7 +48,6 @@ public class UserConverter implements Converter {
        /**
         * User bean
         */
-       @Inject
        private UserWebSessionController userController;
 
        @Override
@@ -115,8 +112,7 @@ public class UserConverter implements Converter {
        /**
         * Initialization of this converter
         */
-       @PostConstruct
-       public void init () {
+       public UserConverter () {
                // Try to get it
                try {
                        // Get initial context
@@ -124,6 +120,9 @@ public class UserConverter implements Converter {
 
                        // Lookup logger
                        this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       // ... and user controller
+                       this.userController = (UserWebSessionController) context.lookup("java:global/juser-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
                        throw new RuntimeException("context.lookup() failed.", ex); //NOI18N