List of usage examples for org.apache.commons.configuration JNDIConfiguration setContext
public void setContext(Context context)
From source file:marshalsec.gadgets.CommonsConfiguration.java
@Args(minArgs = 2, args = { "codebase", "class" }, defaultArgs = { MarshallerBase.defaultCodebase, MarshallerBase.defaultCodebaseClass }) default Object makeConfiguration(UtilFactory uf, String[] args) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, NamingException, Exception { DirContext ctx = JDKUtil.makeContinuationContext(args[0], args[1]); JNDIConfiguration jc = new JNDIConfiguration(); jc.setContext(ctx); jc.setPrefix("foo"); Reflections.setFieldValue(jc, "errorListeners", Collections.EMPTY_LIST); Reflections.setFieldValue(jc, "listeners", Collections.EMPTY_LIST); Reflections.setFieldValue(jc, "log", new NoOpLog()); return jc;/* w w w .j a v a 2 s .c om*/ }