[ 
https://issues.apache.org/jira/browse/CAMEL-8940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14616634#comment-14616634
 ] 

Claus Ibsen commented on CAMEL-8940:
------------------------------------

You should likely remove the @Handler annotation if that is the one from Camel.

> Message routing to a method in the bean is not working if generics is used.
> ---------------------------------------------------------------------------
>
>                 Key: CAMEL-8940
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8940
>             Project: Camel
>          Issue Type: Bug
>          Components: bean-integration
>    Affects Versions: 2.15.2
>            Reporter: Sarat Khilar
>
> 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);
>                               
>                       }
>               };
>       
>       }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to