Exemplo n.º 1
0
  public CamelPlugin(
      ServletBuilder servletBuilder,
      Collection<DataSourceInitializer> dataSourceInitializers,
      Collection<CamelContextCustomizer> camelContextCustomizers)
      throws Exception {
    this.servletBuilder = servletBuilder;
    this.dataSourceInitializers = dataSourceInitializers;
    this.camelContextCustomizers = camelContextCustomizers;

    httpServlet = new CamelHttpTransportServlet();

    httpServlet.init(servletBuilder.servletConfig("CamelServlet", new Properties()));

    camelServlet = servletBuilder.servlet(httpServlet, "/camel/*");
  }
Exemplo n.º 2
0
 @PreDestroy
 public void stop() throws Exception {
   httpServlet.destroy();
   camelContext.stop();
 }