Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8940

Message routing to a method in the bean is not working if generics is used.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.15.2
    • 2.15.2
    • camel-core
    • None
    • Unknown

    Description

      Message routing is not working if generic method inteface is used.

      I have added the code snippet here.

      Bean component:
      public interface IHandler<T>
      {
      @Handler
      public void handle(T data);
      }
      public class EmployeePersistHandler implements IHandler<Employee>
      {
      public EmployeePersistHandler()

      { super(); }

      @Override
      public void handle(Employee data)
      {

      }
      }

      Routing config:
      public RouteBuilder route()
      {

      return new RouteBuilder() {

      @Override
      public void configure() throws Exception

      { System.out.println("Route builder is called"); ThreadPoolBuilder poolBuilder = new ThreadPoolBuilder(createCamelContext()); ExecutorService customPool = poolBuilder.poolSize(5).maxPoolSize(100).maxQueueSize(-1).build("customPool"); from("seda:test").shutdownRunningTask(ShutdownRunningTask.CompleteAllTasks).threads().executorService(customPool).bean(employeePersistHandler); }

      };

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            sarat.khilar@gmail.com Sarat Khilar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: