Example usage for org.springframework.jndi JndiTemplate getContext

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

Introduction

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

Prototype

public Context getContext() throws NamingException 

Source Link

Document

Obtain a JNDI context corresponding to this template's configuration.

Usage

From source file:sk.seges.test.jms.SpringJMSSuite.java

@Override
protected void setJNDIContext() {
    JndiTemplate template = (JndiTemplate) context.getBean("jndiCtx");
    try {/*from   w ww. j a v a 2 s . c  om*/
        jndiContext = template.getContext();
    } catch (NamingException e) {
        throw new RuntimeException(e);
    }
}