When using Camel's Spring Remoting capability, it seems that the
"CamelBeanMethodName" should/could be automatically set, including with
support for overloaded methods by adding the parameter types.

I have an interface with several methods on it and am using the "direct-VM"
transport.  The interface contains the following methods:

    - findById(int id)
    - findByName(String name)
    - create(Person person)

When I call "findById(1)" through the camel:proxy and consume it with the
camel:export, it invokes "findByName(String)".  The same behavior happens
when using the @Produce(uri="direct-vm:...") annotation on the caller. 
Additionally, when I call "create(...)", I receive an
AmbiguousMethodCallException.

I am assuming this fails because the "CamelBeanMethodName" is not
automatically set - is this correct?  Is there already a way to have this
property automatically set that I am missing.  I've ready through the
documentation and the code, but I didn't see anything.

If this isn't currently possible, I'd be happy to try and work on a patch if
my request seems reasonable.  It seems that the ProxyHelper or the
CamelInvocationHandler is the right place for this logic, but my guess is
that the CamelInvocationHandler is used in quite a few places.  Maybe
creating a subclass of CamelInvocationHandler that will attempt to set the
"CamelBeanMethodName" and use that instance in ProxyHelper??  If that would
work, would I need to by concerned about the property already having been
set manually?


Thanks - 
Steve Ardis



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-proxy-CamelProxyFactoryBean-and-CamelBeanMethodName-tp5743359.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to