Examples of CloudStackSpringContext


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

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

    }

    @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

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

    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

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

    }

    @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

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

    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

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
TOP
Copyright © 2018 www.massapi.com. 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.