-
Bug
-
Resolution: Done
-
Major
-
2.8.0-fuse-03-06
-
None
-
None
In the attached example, we have a route that does not specify a method name:
from(this.emailScanner.getInboxUri()). choice(). when(this.emailScanner). //fails and uses matches method bean(this.emailScanner). // works // bean(this.emailScanner, "processMessageWithAttachments").
@Handler public List<Message> processMessageWithAttachments(Message message) { System.out.println("SUSAN withAttachemnets ...."); String subject = (String) message.getHeader(SUBJECT); if(this.log.isInfoEnabled()) {
As you can see the processMessageWithAttachments has the @Handler notation, however, it seems to be ignored. The test will fail when the method name is not provided as it uses another one by default. Here is the good output with some extra debugging:
SUSAN custvalidinBMS .... SUSAN withAttachemnets .... <=== handler guy SUSAN generateMetaData .... SUSAN generateBodyMessage .... SUSAN isattachmentValid ....
And when it fails:
SUSAN custvalidinBMS .... *** SUSAN matches .... SUSAN custvalid .... SUSAN custvalidInCRM ...
Just goes to the wrong method for some reason.
Test case is attached. To run it's just mvn:test