Examples of FileSystemXmlApplicationContext


Examples of org.springframework.context.support.FileSystemXmlApplicationContext

    DOCUMENT ME!
     *
     * @param args
     */
    public static void main(String[] args) {
        ApplicationContext context = new FileSystemXmlApplicationContext(
                "src/test/java/spring.xml");
        IStatusReporter controller = (IStatusReporter) context.getBean(
                "statusReporter");
       
        List reports = controller.getStatusReports();
       
        for (int i = 0; i < reports.size(); i++) {
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

    }

    public void init(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException {
        System.out.println("ServiceMixComponent: init: " + serviceUnitName + " path: " + serviceUnitRootPath);

        FileSystemXmlApplicationContext springContext = new FileSystemXmlApplicationContext("file:"+ serviceUnitRootPath +"/servicemix.xml" );
        SpringServiceUnitContainer ssuc = (SpringServiceUnitContainer) springContext.getBean("jbi");

        ServiceMixServiceUnit suc = new ServiceMixServiceUnit(this, serviceUnitName, serviceUnitRootPath, springContext, ssuc);
        serviceUnitRegistry.put(serviceUnitName, suc);
    }
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

    // Ok, we are going to use the spring infrastructure
    // to create a container
    log
        .info("Creating ServiceMix JBI installer from XML [" + archive
            + "]");
    FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(
        archive);
    context.getBean("jbi");
  }
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

   * @return The generated ApplicationContext from Spring
   */
  public static ApplicationContext getSpringBeans(String installationRoot) {
    Thread.currentThread().setContextClassLoader(
        SpringBuilder.class.getClassLoader());
    FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(
        getSpringConfigFile(installationRoot).getAbsolutePath());
    return context;
  }
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

    }

    public void testParseKVP() throws Exception {
        URL url = getClass().getResource("applicationContext.xml");

        FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(url.toString());

        Dispatcher dispatcher = (Dispatcher) context.getBean("dispatcher");

        MockHttpServletRequest request = new MockHttpServletRequest();
        request.setContextPath("/geoserver");

        request.setupAddParameter("service", "hello");
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

    }

    public void testParseXML() throws Exception {
        URL url = getClass().getResource("applicationContext.xml");

        FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(url.toString());

        Dispatcher dispatcher = (Dispatcher) context.getBean("dispatcher");

        String body = "<Hello service=\"hello\" message=\"Hello world!\"/>";
        File file = File.createTempFile("geoserver", "req");
        file.deleteOnExit();
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

    }

    public void testHelloOperationGet() throws Exception {
        URL url = getClass().getResource("applicationContext.xml");

        FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(url.toString());

        Dispatcher dispatcher = (Dispatcher) context.getBean("dispatcher");

        MockHttpServletRequest request = new MockHttpServletRequest() {
                String encoding;

                public int getServerPort() {
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

    }

    public void testHelloOperationPost() throws Exception {
        URL url = getClass().getResource("applicationContext.xml");

        FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(url.toString());

        Dispatcher dispatcher = (Dispatcher) context.getBean("dispatcher");

        final String body = "<Hello service=\"hello\" message=\"Hello world!\" version=\"1.0.0\" />";
        MockHttpServletRequest request = new MockHttpServletRequest() {
                String encoding;
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

     * @throws Exception
     */
    public void testHelloOperationMixed() throws Exception {
        URL url = getClass().getResource("applicationContextOnlyXml.xml");

        FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(url.toString());

        Dispatcher dispatcher = (Dispatcher) context.getBean("dispatcher");

        final String body = "<Hello service=\"hello\" message=\"Hello world!\" version=\"1.0.0\" />";

        MockHttpServletRequest request = new MockHttpServletRequest() {
                String encoding;
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext

    }
   
    public void testHttpErrorCodeException() throws Exception {
        URL url = getClass().getResource("applicationContext.xml");

        FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(url.toString());

        Dispatcher dispatcher = (Dispatcher) context.getBean("dispatcher");

        MockHttpServletRequest request = new MockHttpServletRequest() {
                String encoding;

                public int getServerPort() {
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.