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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.15.2
    • Fix Version/s: 2.15.2
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: