Search in sources :

Example 16 with Main

use of org.apache.camel.main.Main in project camel by apache.

the class MapMailMessagesBugRoute method main.

public static void main(String... args) throws Exception {
    Main main = new Main();
    main.addRouteBuilder(new MapMailMessagesBugRoute());
    main.run(args);
}
Also used : Main(org.apache.camel.main.Main)

Example 17 with Main

use of org.apache.camel.main.Main in project camel by apache.

the class IntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    this.host = System.getProperty("pgjdbc.test.server", "localhost");
    this.port = System.getProperty("pgjdbc.test.port", "5432");
    this.database = System.getProperty("pgjdbc.test.db", "event_tests");
    this.user = System.getProperty("pgjdbc.test.user", "dphillips");
    this.password = System.getProperty("pgjdbc.test.password");
    ds = new PGDataSource();
    ds.setHost(this.host);
    ds.setPort(Integer.parseInt(this.port));
    ds.setDatabase(this.database);
    ds.setUser(this.user);
    if (this.password != null) {
        ds.setPassword(this.password);
    }
    main = new Main();
    main.bind("test", ds);
    main.addRouteBuilder(buildConsumer());
    main.addRouteBuilder(buildProducer());
}
Also used : PGDataSource(com.impossibl.postgres.jdbc.PGDataSource) Main(org.apache.camel.main.Main) Before(org.junit.Before)

Example 18 with Main

use of org.apache.camel.main.Main in project ddf by codice.

the class AmqpProducerConsumerExample method main.

public static void main(String... args) throws Exception {
    //normally this would run inside of some container and be converted to a camel blueprint.xml
    // but to simplify testing of a route we can use the dsl camel language and run it from a camel main
    Main main = new Main();
    main.addRouteBuilder(new AmqpProducerConsumerExample());
    System.setProperty("javax.net.ssl.keyStore", AmqpProducerConsumerExample.class.getResource("/serverKeystore.jks").toURI().getPath());
    System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
    System.setProperty("javax.net.ssl.trustStore", AmqpProducerConsumerExample.class.getResource("/serverTruststore.jks").toURI().getPath());
    System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
    main.run(args);
}
Also used : Main(org.apache.camel.main.Main)

Aggregations

Main (org.apache.camel.main.Main)18 RouteBuilder (org.apache.camel.builder.RouteBuilder)3 PGDataSource (com.impossibl.postgres.jdbc.PGDataSource)1 Before (org.junit.Before)1