Package org.springframework.context

Examples of org.springframework.context.ConfigurableApplicationContext.stop()


      
        int response = multiplier.multiply(33);
       
        assertEquals("Get a wrong response", 99, response);
       
        context.stop();
    }

}
View Full Code Here


        // as opposed to the CamelClientRemoting example we need to define the service URI in this java code
        int response = (Integer)camelTemplate.sendBody("jms:queue:numbers", ExchangePattern.InOut, 22);
       
        assertEquals("Get a wrong response", 66, response);
       
        context.stop();
    }
   
    @Test
    public void testCamelEndpointInvocation() throws Exception {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client.xml");
View Full Code Here

       
        assertEquals("Get a wrong response.", 33, response);

        // stop and exit the client
        producer.stop();
        context.stop();
    }
   
    @Test
    public void testCamelRemotingInvocation() {
        ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client-remoting.xml");
View Full Code Here

      
        int response = multiplier.multiply(33);
       
        assertEquals("Get a wrong response", 99, response);
       
        context.stop();
    }

}
View Full Code Here

        // as opposed to the CamelClientRemoting example we need to define the service URI in this java code
        int response = (Integer)camelTemplate.sendBody("jms:queue:numbers", ExchangePattern.InOut, 22);
       
        assertEquals("Get a wrong response", 66, response);
       
        context.stop();
       
    }
   
    @Test
    public void testCamelEndpointInvocation() throws Exception {
View Full Code Here

       
        assertEquals("Get a wrong response.", 33, response);

        // stop and exit the client
        producer.stop();
        context.stop();
       
    }
   
    @Test
    public void testCamelRemotingInvocation() {
View Full Code Here

      
        int response = multiplier.multiply(33);
       
        assertEquals("Get a wrong response", 99, response);
       
        context.stop();
       
    }

}
View Full Code Here

    // add a shutdown hook to close spring context
    Runtime.getRuntime().addShutdownHook(new Thread() {
      public void run() {
        log.info("stopping spring context ... ");
        springContext.stop();
        springContext.close();
        log.info("<< spring context stopped >>");
      }
    });
  }
View Full Code Here

      }
    }

    // We don't need this context anymore
    if (closeContextOnCompletion) {
      context.stop();
      context.close();
      context = null;
    }
  }
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.