public static void main(String str[]) { try { CamelContext cc = new DefaultCamelContext(); cc.addRoutes(new RouteBuilder() { public void configure() { from("direct:start1"). to("cxf://http://localhost:8080/JAXWS1/MyInterfaceImpl?serviceClass=com.syed.MyInterface&serviceName={http://syed.com/}MyInterfaceImplService&portName={http://syed.com/}MyInterfaceImplPort"); // } });
cc.start(); ProducerTemplate t = cc.createProducerTemplate(); int annsal = t.requestBody("direct:start1", 10000, Integer.class); System.out.println("annsal:" + annsal); //cc.getShutdownStrategy().setTimeUnit(TimeUnit.SECONDS); //cc.getShutdownStrategy().setTimeout(1); t.stop(); cc.stop(); //cc.getShutdownStrategy().setShutdownNowOnTimeout(true); //Thread.sleep(3000); } catch (Exception i) { i.printStackTrace(); } } -- View this message in context: http://camel.465427.n5.nabble.com/After-camelContext-shutdown-is-any-way-to-exit-the-Java-main-method-tp5735993p5736172.html Sent from the Camel - Users mailing list archive at Nabble.com.