final ConfigurableApplicationContext ctx = (ConfigurableApplicationContext)
WebApplicationContextUtils.getRequiredWebApplicationContext((ServletContext)wapp.getNativeContext());
//add listener for ZK + Security
if (ctx.containsBeanDefinition(ZkBeanIds.ZK_DESKTOP_REUSE_FILTER)) {
conf.addListener(ZkSecurityContextListener.class);
conf.addListener(ZkExceptionTranslationListener.class);
conf.addListener(ZkEventProcessListener.class);
}