]> git.mxchange.org Git - jjobs-war.git/blobdiff - src/java/org/mxchange/jjobs/beans/phone/JobsPhoneWebApplicationBean.java
Please cherry-pick:
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / phone / JobsPhoneWebApplicationBean.java
index 7c43385594f1b9579b1c70f3121b6bdd08bc5452..3d14b2894382c5df1e74f4658f3830f12667d759 100644 (file)
@@ -85,17 +85,8 @@ public class JobsPhoneWebApplicationBean extends BaseJobsController implements J
         * Default constructor
         */
        public JobsPhoneWebApplicationBean () {
-               // Try it
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Try to lookup the beans
-                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
-               } catch (final NamingException e) {
-                       // Throw it again
-                       throw new FaceletException(e);
-               }
+               // Call super constructor
+               super();
 
                // Init all lists
                this.mobileNumbers = new LinkedList<>();
@@ -450,6 +441,18 @@ public class JobsPhoneWebApplicationBean extends BaseJobsController implements J
         */
        @PostConstruct
        public void init () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup the beans
+                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jjobs-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw it again
+                       throw new FaceletException(e);
+               }
+
                // All phone numbers
                this.allMobileNumbers().addAll(this.phoneBean.allMobileNumbers());
                this.allFaxNumbers().addAll(this.phoneBean.allFaxNumbers());