[
https://issues.apache.org/activemq/browse/CAMEL-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42778#action_42778
]
James Strachan commented on CAMEL-267:
--------------------------------------
Claus - you can use the Type Converter stuff do do all kinds of wacky stuff! :)
e.g. here's how we can invoke a JMS MessageListener as a bean in any Camel
route...
https://svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/converter/InvokeJmsMessageListenerTest.java
we could use a similar trick to integrate with any other 'messaging' API -
whether its Servlets, Restlets, JBI, Mule or whatever
> Predicate cannot be used as BeanProcessor
> -----------------------------------------
>
> Key: CAMEL-267
> URL: https://issues.apache.org/activemq/browse/CAMEL-267
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.3.0, 1.4.0
> Reporter: Aaron Crickenberger
> Assignee: James Strachan
> Priority: Minor
> Fix For: 1.4.0
>
> Attachments: PredicateAsBeanTest.java
>
>
> The current Bean Expression mechanism doesn't support the use of a Predicate
> as the Bean/POJO. The problem is that BeanInfo tries to use matches(Object)
> instead of matches(Exchange). If you use the extra "methodName" hint, this
> happens because BeanInfo uses operations.get(name), which will only return
> the most recently introspected method (potentially the Object one.) If you
> don't, then BeanInfo will try to find a method based on the inbound message
> body type, ignoring methods that take Exchange as a parameter.
> This may too esoteric to bother working around? It's relatively easy to
> workaround for the common case (match the incoming body), but it's still a
> little unexpected. The only thing I can see this preventing is the use of
> Predicates that are looking at multiple messages at once (eg: comparing delta
> between in & out messages in an exchange.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.