Skip to content

Instantly share code, notes, and snippets.

@cmoulliard
Created October 18, 2013 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmoulliard/7037709 to your computer and use it in GitHub Desktop.
Save cmoulliard/7037709 to your computer and use it in GitHub Desktop.
package org.fusesource.workshop.cdi;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.cdi.ContextName;
import org.fusesource.poc.routes.WebServiceToPojoUsingQueue;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
public class WebServiceRouting {
@Inject @ContextName("cxf")
private CamelContext ctx;
@Inject
private WebServiceToPojoUsingQueue cxfRoute;
@PostConstruct
private void loadAndStart() throws Exception {
System.out.print(">> Context loaded");
ctx.addRoutes(cxfRoute);
ctx.start();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment