congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
JndiLocatorDelegate.lookup
Code IndexAdd Tabnine to your IDE (free)

How to use
lookup
method
in
org.springframework.jndi.JndiLocatorDelegate

Best Java code snippets using org.springframework.jndi.JndiLocatorDelegate.lookup (Showing top 20 results out of 315)

origin: spring-projects/spring-framework

@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");
    }
  }
}
origin: spring-projects/spring-framework

@Override
public void afterPropertiesSet() throws NamingException {
  if (this.jndiName != null) {
    setConcurrentExecutor(this.jndiLocator.lookup(this.jndiName, Executor.class));
  }
}
origin: org.springframework/spring-context

@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");
    }
  }
}
origin: org.springframework/spring-context

@Override
public void afterPropertiesSet() throws NamingException {
  if (this.jndiName != null) {
    setConcurrentExecutor(this.jndiLocator.lookup(this.jndiName, Executor.class));
  }
}
origin: spring-projects/spring-framework

  @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);
    }
  }
},
origin: spring-projects/spring-framework

@Override
public void afterPropertiesSet() throws NamingException {
  if (this.jndiName != null) {
    ScheduledExecutorService executor = this.jndiLocator.lookup(this.jndiName, ScheduledExecutorService.class);
    setConcurrentExecutor(executor);
    setScheduledExecutor(executor);
  }
}
origin: spring-projects/spring-framework

Object value = this.source.lookup(name);
if (logger.isDebugEnabled()) {
  logger.debug("JNDI lookup for name [" + name + "] returned: [" + value + "]");
origin: org.springframework/spring-context

  @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);
    }
  }
},
origin: spring-projects/spring-framework

  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);
  }
}
origin: org.springframework/spring-context

@Override
public void afterPropertiesSet() throws NamingException {
  if (this.jndiName != null) {
    ScheduledExecutorService executor = this.jndiLocator.lookup(this.jndiName, ScheduledExecutorService.class);
    setConcurrentExecutor(executor);
    setScheduledExecutor(executor);
  }
}
origin: org.springframework/spring-context

Object value = this.source.lookup(name);
if (logger.isDebugEnabled()) {
  logger.debug("JNDI lookup for name [" + name + "] returned: [" + value + "]");
origin: org.springframework/spring-orm

  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);
  }
}
origin: stackoverflow.com

 JndiLocatorDelegate jndi = JndiLocatorDelegate.createDefaultResourceRefLocator();
Object lookup = jndi.lookup(propertiesLocation);
origin: apache/servicemix-bundles

@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");
    }
  }
}
origin: apache/servicemix-bundles

@Override
public void afterPropertiesSet() throws NamingException {
  if (this.jndiName != null) {
    setConcurrentExecutor(this.jndiLocator.lookup(this.jndiName, Executor.class));
  }
}
origin: stackoverflow.com

 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);
  }
}
origin: apache/servicemix-bundles

  @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);
    }
  }
},
origin: apache/servicemix-bundles

@Override
public void afterPropertiesSet() throws NamingException {
  if (this.jndiName != null) {
    ScheduledExecutorService executor = this.jndiLocator.lookup(this.jndiName, ScheduledExecutorService.class);
    setConcurrentExecutor(executor);
    setScheduledExecutor(executor);
  }
}
origin: apache/servicemix-bundles

Object value = this.source.lookup(name);
if (logger.isDebugEnabled()) {
  logger.debug("JNDI lookup for name [" + name + "] returned: [" + value + "]");
origin: apache/servicemix-bundles

  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);
  }
}
org.springframework.jndiJndiLocatorDelegatelookup

Popular methods of JndiLocatorDelegate

  • <init>
  • setJndiTemplate
  • setResourceRef
  • isDefaultJndiEnvironmentAvailable
    Check whether a default JNDI environment, as in a Java EE environment, is available on this JVM.
  • setJndiEnvironment
  • createDefaultResourceRefLocator
    Configure a JndiLocatorDelegate with its "resourceRef" property set to true, meaning that all names
  • isResourceRef

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Reference (javax.naming)
  • JList (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now