boolean enabled = false;
@Override
public void init(FilterConfig filterConfig) throws ServletException {
String module = filterConfig.getInitParameter("module");
CloudStackSpringContext context =
(CloudStackSpringContext) filterConfig.getServletContext().getAttribute(CloudStackSpringContext.CLOUDSTACK_CONTEXT_SERVLET_KEY);
if ( context == null )
return;
ApplicationContext applicationContext = context.getApplicationContextForWeb(module);
if ( applicationContext != null ) {
AutowireCapableBeanFactory factory = applicationContext.getAutowireCapableBeanFactory();
if ( factory != null ) {
factory.autowireBean(this);
enabled = true;