Example usage for org.springframework.jndi.support SimpleJndiBeanFactory getJndiTemplate

List of usage examples for org.springframework.jndi.support SimpleJndiBeanFactory getJndiTemplate

Introduction

In this page you can find the example usage for org.springframework.jndi.support SimpleJndiBeanFactory getJndiTemplate.

Prototype

public JndiTemplate getJndiTemplate() 

Source Link

Document

Return the JNDI template to use for JNDI lookups.

Usage

From source file:marshalsec.gadgets.SpringUtil.java

public static BeanFactory makeJNDITrigger(String jndiUrl) throws Exception {
    SimpleJndiBeanFactory bf = new SimpleJndiBeanFactory();
    bf.setShareableResources(jndiUrl);/*  ww w.  ja v  a2s.co m*/
    Reflections.setFieldValue(bf, "logger", new NoOpLog());
    Reflections.setFieldValue(bf.getJndiTemplate(), "logger", new NoOpLog());
    return bf;
}