Example usage for org.springframework.jndi JndiTemplate JndiTemplate

List of usage examples for org.springframework.jndi JndiTemplate JndiTemplate

Introduction

In this page you can find the example usage for org.springframework.jndi JndiTemplate JndiTemplate.

Prototype

public JndiTemplate(@Nullable Properties environment) 

Source Link

Document

Create a new JndiTemplate instance, using the given environment.

Usage

From source file:ragna.wl1036.web.support.infra.ComponentConfig.java

@Bean
public JndiTemplate jndiTemplate() {
    Properties jndiProps = new Properties();

    jndiProps.setProperty("java.naming.factory.initial", env.getProperty("jms.jndi.factory.initial"));
    jndiProps.setProperty("java.naming.provider.url", env.getProperty("jms.provider.url"));
    jndiProps.setProperty("java.naming.security.principal", env.getProperty("jms.user"));
    jndiProps.setProperty("java.naming.security.credentials", env.getProperty("jms.pwd"));

    JndiTemplate jndiTemplate = new JndiTemplate(jndiProps);

    return jndiTemplate;
}

From source file:org.springframework.jndi.AbstractJndiLocator.java

/**
 * Set the JNDI environment to use for the JNDI lookup.
 * Creates a JndiTemplate with the given environment settings.
 * @see #setJndiTemplate/*  w w  w. j a  v  a2  s .  c o  m*/
 */
public final void setJndiEnvironment(Properties jndiEnvironment) {
    this.jndiTemplate = new JndiTemplate(jndiEnvironment);
}

From source file:org.springframework.jndi.JndiAccessor.java

/**
 * Set the JNDI environment to use for JNDI lookups.
 * <p>Creates a JndiTemplate with the given environment settings.
 * @see #setJndiTemplate/*w ww. ja v  a 2  s .c o m*/
 */
public void setJndiEnvironment(@Nullable Properties jndiEnvironment) {
    this.jndiTemplate = new JndiTemplate(jndiEnvironment);
}