camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mitko Kolev (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAMEL-2549) Camel Exec component
Date Fri, 23 Apr 2010 09:01:26 GMT

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

Mitko Kolev edited comment on CAMEL-2549 at 4/23/10 4:59 AM:
-------------------------------------------------------------

Hi everyone, 

{quote}
Each route should then IMHO be able to get the exec result without being aware of the stream
where it is located (err or out).
{quote}

If you have both {{stdout}} and {{stderr}}  filled, it is hard to chose what would be a result,
because this can be use-case specific. That's why I think it is important to have the body
filled with the stdout (but not the stderr) by default. However it would make sense to write
{{sdtderr}} in the out-body *only* when the {{stdout}} is {{null}}, for convenience. This
must cover your case. 

About the stream conversion, I think it would be better to reset the streams, only if they
are of type {{ByteArrayInputStream}}, which is by default. This will be OK with the default
implementation of the default {{ExecCommandExecutor}}, and will not break other different
input stream sources, however the component will behave differently on different input stream
sources with not - resetable streams. I find the behavior acceptabe.

What do you think for both?
* Returning {{stderr}}, only when {{stdout}} is {{null}}
* Resetting the streams only if they are {{ByteArrayInputStream}}

BTW, i also tried different scenarios using stream caching, and it did not do what i expected.
I'll investigate the issue further. 


      was (Author: mkolev):
    Hi everyone, 

{quote}
Each route should then IMHO be able to get the exec result without being aware of the stream
where it is located (err or out).
{quote}

If you have both {{stdout}} and {{stderr}}  filled, it is hard to chose what would be a result,
because this can be use-case specific. That's why I think it is important to have the body
filled with the stdout (but not the stderr) by default. However it would make sense to write
{{sdtderr}} in the out-body *only* when the {{stdout}} is {{null}}, for convenience. This
must cover your case. 

About the stream conversion, I think it would be better to reset the streams, only if they
are of type {{ByteArrayInputStream}}, which is by default. This will be OK with the default
implementation of {{ExecResult}}, and will not break other different input stream sources,
however the component will behave differently on different input stream sources with not -
resetable streams. I find the behavior acceptabe.

What do you think for both?
* Returning {{stderr}}, only when {{stdout}} is {{null}}
* Resetting the streams only if they are {{ByteArrayInputStream}}

BTW, i also tried different scenarios using a stream converter, and it did not do what i expected.
I'll investigate the issue further. 

  
> 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-3.diff, camel-exec-component-feedback.zip, camel-exec-patch.diff,
camel-exec-patch2.diff, exec-wiki.txt
>
>


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


Mime
View raw message