// Create the spring security context
URL securityConfig = bundleCtx.getBundle().getResource(SECURITY_CONFIG_FILE);
ConfigurableOsgiBundleApplicationContext springContext = null;
springContext = new OsgiBundleXmlApplicationContext(new String[] { securityConfig.toExternalForm() });
springContext.setBundleContext(bundleCtx);
springContext.refresh();
// Get the security filter chain from the spring context
Filter defaultSecurityFilter = (Filter) springContext.getBean("springSecurityFilterChain");
securityFilter = new SecurityFilter(securityService, sites, defaultSecurityFilter);