Package org.springframework.context.support

Examples of org.springframework.context.support.ClassPathXmlApplicationContext.destroy()


            assertNotNull(shell);
            shell.execute("optional/cat src/test/resources/org/apache/servicemix/kernel/gshell/core/gshell-test.xml");
            shell.execute("optional/find src/test/resources/org/apache/servicemix/kernel/gshell/core/gshell-test.xml");
        } finally {
            if (context != null) {
                context.destroy();
            }
        }
    }

}
View Full Code Here


            Customer customer = customerService.getCustomer("12345");
            assertNotNull("We should get Customer here", customer);
        } finally {
            if (clientContext != null) {
                clientContext.destroy();
            }
            if (serverContext != null) {
                serverContext.destroy();
            }
        }
View Full Code Here

            new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/systest/bus/servlet.xml"});
        Bus bus = new SpringBusFactory(ctx).createBus();
        checkBindingExtensions(bus);
        checkHTTPTransportFactories(bus);
        checkOtherCoreExtensions(bus);
        ctx.destroy();
    }
    @Test
    public void testLoadBusWithApplicationContext() throws BusException {
        ClassPathXmlApplicationContext ctx =
            new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/systest/bus/basic.xml"});
View Full Code Here


        //
        // Stop the Spring Context
        //
        context.destroy();
    }
}
View Full Code Here

//        assertEquals("Hello MySpringBean", echoReverse.echoReverse("Hello"));

        //
        // Stop the Spring Context
        //
        context.destroy();
    }
}
View Full Code Here

            context = new ClassPathXmlApplicationContext(DEFAULT_SPRING_CONTEXT, cli.springConfig);
        }
        try {
            context.getBean(Main.class).run(cli);
        } finally {
            context.destroy();
        }
    }

    private static void printUsage(final int exitCode) {
        Args.usage(CliDefinition.class);
View Full Code Here

            new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/systest/bus/servlet.xml"});
        Bus bus = new SpringBusFactory(ctx).createBus();
        checkBindingExtensions(bus);
        checkHTTPTransportFactories(bus);
        checkOtherCoreExtensions(bus);
        ctx.destroy();
    }
    @Test
    public void testLoadBusWithApplicationContext() throws BusException {
        ClassPathXmlApplicationContext ctx =
            new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/systest/bus/basic.xml"});
View Full Code Here

        ctx.refresh();
        bus = ctx.getBean("cxf", Bus.class);
        checkBindingExtensions(bus);
        checkHTTPTransportFactories(bus);
        checkOtherCoreExtensions(bus);
        ctx.destroy();
    }
   
    private void checkBindingExtensions(Bus bus) throws BusException {
        BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class)
        assertNotNull("No binding factory manager", bfm);
View Full Code Here

            = new ClassPathXmlApplicationContext(new String[] {"classpath:client-applicationContext.xml"});
        CustomerServiceTester client = (CustomerServiceTester)context.getBean("tester");
       
        client.testCustomerService();
        context.stop();
        context.destroy();
        //System.exit(0);
    }
}
View Full Code Here

    public static void main(String args[]) throws Exception {
        ClassPathXmlApplicationContext ctx
            = new ClassPathXmlApplicationContext("server-applicationContext.xml");
        System.in.read();
        ctx.stop();
        ctx.destroy();
    }
}
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.