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

Claus Ibsen commented on CAMEL-2549:
------------------------------------

Good work

In Camel 2.x you can use the # notation to lookup complex objects from endpoint 
uris. So no need to have xxxRef string parameters anymore.

So I recon all the custom code you have in ExecComponent can be handled out of 
the box, using the {{setProperties}} method.
You should still set the remaning as the executable. But the reference lookup 
and whatnot should all be handed out of the box.

And then you do not need any special xxRef options at all.
eg 
{code}
?commandExecutorRef=myCmdExec
{code}

becomes
{code}
?commandExecutor=#myCmdExec
{code}

So the component code could probably be changed to something like this

{code}
+    protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
+        ExecEndpoint endpoint = new ExecEndpoint(uri, this);
setProperties(endpoint, parameters);
endpoint.setExecutable(remaining);
+        return endpoint;
{code}

> Camel Exec component
> --------------------
>
>                 Key: CAMEL-2549
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2549
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 2.3.0
>         Environment: Tested on Windows XP and Linux
>            Reporter: Mitko Kolev
>            Assignee: Martin Krasser
>             Fix For: 2.3.0
>
>         Attachments: camel-exec-patch.diff, camel-exec-patch2.diff
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to