- // Is the bean there?
- // @TODO Requires this synchronization or is it (sync) confusing the container?
- if (null == JobsLandLineNumberConverter.PHONE_BEAN) {
- // Try to get it
- try {
- // Get initial context
- Context initialContext = new InitialContext();
-
- // ... and user controller
- JobsLandLineNumberConverter.PHONE_BEAN = (PhoneSessionBeanRemote) initialContext.lookup("java:global/jjobs-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
- } catch (final NamingException ex) {
- // Continue to throw it
- throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
- }
- }
-