Package org.apache.camel.example.jms

Examples of org.apache.camel.example.jms.JmsBroker


        // START SNIPPET: e1
        CamelContext context = new DefaultCamelContext();
        // END SNIPPET: e1
        // Set up the JMS broker and the CXF SOAP over JMS server
        // START SNIPPET: e2
        JmsBroker broker = new JmsBroker();
        Server server = new Server();
        try {
            broker.start();
            server.start();
            // END SNIPPET: e2
            // Add some configuration by hand ...
            // START SNIPPET: e3
            context.addRoutes(new RouteBuilder() {
                public void configure() {
                    // Here we just pass the exception back , don't need to use errorHandler
                    errorHandler(noErrorHandler());
                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);
                }
            });
            // END SNIPPET: e3
            // Starting the routing context
            // Using the CXF Client to kick off the invocations
            // START SNIPPET: e4
            context.start();
            Client client = new Client(ROUTER_ADDRESS + "?wsdl");
            // END SNIPPET: e4
            // Now everything is set up - let's start the context

            client.invoke();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }

    }
View Full Code Here


        // START SNIPPET: e1
        CamelContext context = new DefaultCamelContext();
        // END SNIPPET: e1
        // Set up the JMS broker and the CXF SOAP over JMS server
        // START SNIPPET: e2
        JmsBroker broker = new JmsBroker();
        Server server = new Server();
        try {
            broker.start();
            server.start();
            // END SNIPPET: e2
            // Add some configuration by hand ...
            // START SNIPPET: e3
            context.addRoutes(new RouteBuilder() {
                public void configure() {
                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);
                }
            });
            // END SNIPPET: e3
            // Starting the routing context
            // Using the CXF Client to kick off the invocations
            // START SNIPPET: e4
            context.start();
            Client client = new Client(ROUTER_ADDRESS + "?wsdl");
            // END SNIPPET: e4
            // Now everything is set up - let's start the context

            client.invoke();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }

    }
View Full Code Here

        // START SNIPPET: e1
        CamelContext context = new DefaultCamelContext();
        // END SNIPPET: e1
        // set up the jms broker and the CXF SOAP over JMS server
        // START SNIPPET: e2
        JmsBroker broker = new JmsBroker();
        Server server = new Server();
        try {    
            broker.start();
            server.start();
            // END SNIPPET: e2
            // Add some configuration by hand ...
            // START SNIPPET: e3
            context.addRoutes(new RouteBuilder() {
                public void configure() {
                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);              
                }
            });
            // END SNIPPET: e3
            // Staring the routing context
            // Using the CXF Client to kick off the invocations
            // START SNIPPET: e4
            context.start();
            Client client = new Client(ROUTER_ADDRESS + "?wsdl");
            // END SNIPPET: e4
            // Now everything is set up - lets start the context
            
            client.invock();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }
       
    }
View Full Code Here

        // START SNIPPET: e1
        CamelContext context = new DefaultCamelContext();
        // END SNIPPET: e1
        // Set up the JMS broker and the CXF SOAP over JMS server
        // START SNIPPET: e2
        JmsBroker broker = new JmsBroker();
        Server server = new Server();
        try {
            broker.start();
            server.start();
            // END SNIPPET: e2
            // Add some configuration by hand ...
            // START SNIPPET: e3
            context.addRoutes(new RouteBuilder() {
                public void configure() {
                    // Here we just pass the exception back , don't need to use errorHandler
                    errorHandler(noErrorHandler());
                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);
                }
            });
            // END SNIPPET: e3
            // Starting the routing context
            // Using the CXF Client to kick off the invocations
            // START SNIPPET: e4
            context.start();
            Client client = new Client(ROUTER_ADDRESS + "?wsdl");
            // END SNIPPET: e4
            // Now everything is set up - let's start the context

            client.invoke();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }

    }
View Full Code Here

        // START SNIPPET: e1
        CamelContext context = new DefaultCamelContext();
        // END SNIPPET: e1
        // Set up the JMS broker and the CXF SOAP over JMS server
        // START SNIPPET: e2
        JmsBroker broker = new JmsBroker();
        Server server = new Server();
        try {
            broker.start();
            server.start();
            // END SNIPPET: e2
            // Add some configuration by hand ...
            // START SNIPPET: e3
            context.addRoutes(new RouteBuilder() {
                public void configure() {
                    // Here we just pass the exception back , don't need to use errorHandler
                    errorHandler(noErrorHandler());
                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);
                }
            });
            // END SNIPPET: e3
            // Starting the routing context
            // Using the CXF Client to kick off the invocations
            // START SNIPPET: e4
            context.start();
            Client client = new Client(ROUTER_ADDRESS + "?wsdl");
            // END SNIPPET: e4
            // Now everything is set up - let's start the context

            client.invoke();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }

    }
View Full Code Here

        // START SNIPPET: e1
        CamelContext context = new DefaultCamelContext();
        // END SNIPPET: e1
        // Set up the JMS broker and the CXF SOAP over JMS server
        // START SNIPPET: e2
        JmsBroker broker = new JmsBroker();
        Server server = new Server();
        try {
            broker.start();
            server.start();
            // END SNIPPET: e2
            // Add some configuration by hand ...
            // START SNIPPET: e3
            context.addRoutes(new RouteBuilder() {
                public void configure() {
                    // Here we just pass the exception back , don't need to use errorHandler
                    errorHandler(noErrorHandler());
                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);
                }
            });
            // END SNIPPET: e3
            // Starting the routing context
            // Using the CXF Client to kick off the invocations
            // START SNIPPET: e4
            context.start();
            Client client = new Client(ROUTER_ADDRESS + "?wsdl");
            // END SNIPPET: e4
            // Now everything is set up - let's start the context

            client.invoke();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }

    }
View Full Code Here

        // START SNIPPET: e1
        CamelContext context = new DefaultCamelContext();
        // END SNIPPET: e1
        // Set up the JMS broker and the CXF SOAP over JMS server
        // START SNIPPET: e2
        JmsBroker broker = new JmsBroker();
        Server server = new Server();
        try {
            broker.start();
            server.start();
            // END SNIPPET: e2
            // Add some configuration by hand ...
            // START SNIPPET: e3
            context.addRoutes(new RouteBuilder() {
                public void configure() {
                    // Here we just pass the exception back , don't need to use errorHandler
                    errorHandler(noErrorHandler());
                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);
                }
            });
            // END SNIPPET: e3
            // Starting the routing context
            // Using the CXF Client to kick off the invocations
            // START SNIPPET: e4
            context.start();
            Client client = new Client(ROUTER_ADDRESS + "?wsdl");
            // END SNIPPET: e4
            // Now everything is set up - let's start the context

            client.invoke();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }

    }
View Full Code Here

        // START SNIPPET: e1
        CamelContext context = new DefaultCamelContext();
        // END SNIPPET: e1
        // Set up the JMS broker and the CXF SOAP over JMS server
        // START SNIPPET: e2
        JmsBroker broker = new JmsBroker();
        Server server = new Server();
        try {
            broker.start();
            server.start();
            // END SNIPPET: e2
            // Add some configuration by hand ...
            // START SNIPPET: e3
            context.addRoutes(new RouteBuilder() {
                public void configure() {
                    // Here we just pass the exception back , don't need to use errorHandler
                    errorHandler(noErrorHandler());
                    from(ROUTER_ENDPOINT_URI).to(SERVICE_ENDPOINT_URI);
                }
            });
            // END SNIPPET: e3
            // Starting the routing context
            // Using the CXF Client to kick off the invocations
            // START SNIPPET: e4
            context.start();
            Client client = new Client(ROUTER_ADDRESS + "?wsdl");
            // END SNIPPET: e4
            // Now everything is set up - let's start the context

            client.invoke();
            Thread.sleep(1000);
            context.stop();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            server.stop();
            broker.stop();
            System.exit(0);
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.camel.example.jms.JmsBroker

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.