@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { try { this.threadFactory = this.jndiLocator.lookup(this.jndiName, ThreadFactory.class); } catch (NamingException ex) { if (logger.isTraceEnabled()) { logger.trace("Failed to retrieve [" + this.jndiName + "] from JNDI", ex); } logger.info("Could not find default managed thread factory in JNDI - " + "proceeding with default local thread factory"); } } }
@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { setConcurrentExecutor(this.jndiLocator.lookup(this.jndiName, Executor.class)); } }
@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { try { this.threadFactory = this.jndiLocator.lookup(this.jndiName, ThreadFactory.class); } catch (NamingException ex) { if (logger.isTraceEnabled()) { logger.trace("Failed to retrieve [" + this.jndiName + "] from JNDI", ex); } logger.info("Could not find default managed thread factory in JNDI - " + "proceeding with default local thread factory"); } } }
@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { setConcurrentExecutor(this.jndiLocator.lookup(this.jndiName, Executor.class)); } }
@Override public MBeanServer getMBeanServer() { try { return new JndiLocatorDelegate().lookup("java:comp/env/jmx/runtime", MBeanServer.class); } catch (NamingException ex) { throw new MBeanServerNotFoundException("Failed to retrieve WebLogic MBeanServer from JNDI", ex); } } },
@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { ScheduledExecutorService executor = this.jndiLocator.lookup(this.jndiName, ScheduledExecutorService.class); setConcurrentExecutor(executor); setScheduledExecutor(executor); } }
Object value = this.source.lookup(name); if (logger.isDebugEnabled()) { logger.debug("JNDI lookup for name [" + name + "] returned: [" + value + "]");
@Override public MBeanServer getMBeanServer() { try { return new JndiLocatorDelegate().lookup("java:comp/env/jmx/runtime", MBeanServer.class); } catch (NamingException ex) { throw new MBeanServerNotFoundException("Failed to retrieve WebLogic MBeanServer from JNDI", ex); } } },
public <T> T lookup(String jndiName, Class<T> requiredType) throws Exception { JndiLocatorDelegate locator = new JndiLocatorDelegate(); if (jndiEnvironment instanceof JndiTemplate) { locator.setJndiTemplate((JndiTemplate) jndiEnvironment); } else if (jndiEnvironment instanceof Properties) { locator.setJndiEnvironment((Properties) jndiEnvironment); } else if (jndiEnvironment != null) { throw new IllegalStateException("Illegal 'jndiEnvironment' type: " + jndiEnvironment.getClass()); } locator.setResourceRef(resourceRef); return locator.lookup(jndiName, requiredType); } }
@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { ScheduledExecutorService executor = this.jndiLocator.lookup(this.jndiName, ScheduledExecutorService.class); setConcurrentExecutor(executor); setScheduledExecutor(executor); } }
Object value = this.source.lookup(name); if (logger.isDebugEnabled()) { logger.debug("JNDI lookup for name [" + name + "] returned: [" + value + "]");
public <T> T lookup(String jndiName, Class<T> requiredType) throws Exception { JndiLocatorDelegate locator = new JndiLocatorDelegate(); if (jndiEnvironment instanceof JndiTemplate) { locator.setJndiTemplate((JndiTemplate) jndiEnvironment); } else if (jndiEnvironment instanceof Properties) { locator.setJndiEnvironment((Properties) jndiEnvironment); } else if (jndiEnvironment != null) { throw new IllegalStateException("Illegal 'jndiEnvironment' type: " + jndiEnvironment.getClass()); } locator.setResourceRef(resourceRef); return locator.lookup(jndiName, requiredType); } }
JndiLocatorDelegate jndi = JndiLocatorDelegate.createDefaultResourceRefLocator(); Object lookup = jndi.lookup(propertiesLocation);
@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { try { this.threadFactory = this.jndiLocator.lookup(this.jndiName, ThreadFactory.class); } catch (NamingException ex) { if (logger.isTraceEnabled()) { logger.trace("Failed to retrieve [" + this.jndiName + "] from JNDI", ex); } logger.info("Could not find default managed thread factory in JNDI - " + "proceeding with default local thread factory"); } } }
@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { setConcurrentExecutor(this.jndiLocator.lookup(this.jndiName, Executor.class)); } }
public class EnvironmentApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> { private final JndiLocatorDelegate jndi = JndiLocatorDelegate.createDefaultResourceRefLocator(); @Override public void initialize(ConfigurableApplicationContext applicationContext) { String profile = jndi.lookup("bla/environment", String.class); applicationContext.getEnvironment().addActiveProfile(profile); } }
@Override public MBeanServer getMBeanServer() { try { return new JndiLocatorDelegate().lookup("java:comp/env/jmx/runtime", MBeanServer.class); } catch (NamingException ex) { throw new MBeanServerNotFoundException("Failed to retrieve WebLogic MBeanServer from JNDI", ex); } } },
@Override public void afterPropertiesSet() throws NamingException { if (this.jndiName != null) { ScheduledExecutorService executor = this.jndiLocator.lookup(this.jndiName, ScheduledExecutorService.class); setConcurrentExecutor(executor); setScheduledExecutor(executor); } }
Object value = this.source.lookup(name); if (logger.isDebugEnabled()) { logger.debug("JNDI lookup for name [" + name + "] returned: [" + value + "]");
public <T> T lookup(String jndiName, Class<T> requiredType) throws Exception { JndiLocatorDelegate locator = new JndiLocatorDelegate(); if (jndiEnvironment instanceof JndiTemplate) { locator.setJndiTemplate((JndiTemplate) jndiEnvironment); } else if (jndiEnvironment instanceof Properties) { locator.setJndiEnvironment((Properties) jndiEnvironment); } else if (jndiEnvironment != null) { throw new IllegalStateException("Illegal 'jndiEnvironment' type: " + jndiEnvironment.getClass()); } locator.setResourceRef(resourceRef); return locator.lookup(jndiName, requiredType); } }