Example usage for org.springframework.jndi JndiLocatorDelegate createDefaultResourceRefLocator

List of usage examples for org.springframework.jndi JndiLocatorDelegate createDefaultResourceRefLocator

Introduction

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

Prototype

public static JndiLocatorDelegate createDefaultResourceRefLocator() 

Source Link

Document

Configure a JndiLocatorDelegate with its "resourceRef" property set to true , meaning that all names will be prefixed with "java:comp/env/".

Usage

From source file:fr.mycellar.configuration.TargetConfiguration.java

@Bean
public Session session() throws NamingException {
    return JndiLocatorDelegate.createDefaultResourceRefLocator().lookup("mail/Session", Session.class);
}