Package org.apache.cloudstack.spring.module.factory

Examples of org.apache.cloudstack.spring.module.factory.CloudStackSpringContext


    public Main() {

    }

    public void start() throws Exception {
        CloudStackSpringContext context = new CloudStackSpringContext();
        context.registerShutdownHook();

        if (Boolean.getBoolean("force.exit")) {
            System.exit(0);
        }
    }
View Full Code Here


    }

    @Override
    public void contextInitialized(ServletContextEvent event) {
        try {
            cloudStackContext = new CloudStackSpringContext();
            event.getServletContext().setAttribute(CloudStackSpringContext.CLOUDSTACK_CONTEXT_SERVLET_KEY, cloudStackContext);
        } catch (IOException e) {
            log.error("Failed to start CloudStack", e);
            throw new RuntimeException("Failed to initialize CloudStack Spring modules", e);
        }
View Full Code Here

    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;
View Full Code Here

    }

    @Override
    public void contextInitialized(ServletContextEvent event) {
        try {
            cloudStackContext = new CloudStackSpringContext();
            event.getServletContext().setAttribute(CloudStackSpringContext.CLOUDSTACK_CONTEXT_SERVLET_KEY, cloudStackContext);
        } catch (IOException e) {
            log.error("Failed to start CloudStack", e);
            throw new RuntimeException("Failed to initialize CloudStack Spring modules", e);
        }
View Full Code Here

    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;
View Full Code Here

    public Main() {
       
    }
   
    public void start() throws Exception {
        CloudStackSpringContext context = new CloudStackSpringContext();
        context.registerShutdownHook();
       
        if ( Boolean.getBoolean("force.exit") ) {
            System.exit(0);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.spring.module.factory.CloudStackSpringContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.