List of usage examples for org.apache.commons.configuration JNDIConfiguration setPrefix
public void setPrefix(String prefix)
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);//from w ww .jav a 2 s.com 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; }