Package org.springframework.context.support

Examples of org.springframework.context.support.FileSystemXmlApplicationContext


    if (args.length == 0) {
      System.out.println("Usage: "+SpringEngineStarter.class.getName()+" <configLocations>");
      System.exit(-2);
    }
    try {
      new FileSystemXmlApplicationContext(args);
    }
    catch(Exception e) {
      logger.error("Startup failed",e);
      System.exit(-1);
    }
View Full Code Here


     * NOTE: This only works against the SENS modules! Not vanilla geoserver!
     *
     * @param args
     */
    public static void main(String[] args) {
        ApplicationContext context = new FileSystemXmlApplicationContext(
                "src/test/java/spring.xml");
        IPreferenceStore controller = (IPreferenceStore) context.getBean(
                "preferenceService");
        System.out.println("Before setDefault: " + controller.getString("test"));
        controller.setDefault("test", "defaultValue");
        System.out.println("After setDefault: " + controller.getString("test"));
        controller.set("test", "setValue");
View Full Code Here

    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

    }

    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

    // 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

   * @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

    }

    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

    }

    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

    }

    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

    }

    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

TOP

Related Classes of org.springframework.context.support.FileSystemXmlApplicationContext

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.