It should be quite easy to write a TeeInputStream that would write to
an OutputStream each time a charachter is read from the input stream.
However, the content of the NormalizedMessage is a Source and may not
be a stream.

However, I think it would be easier to put this feature inside the BC
rather than in an intermediate (a ExchangeListener on the container?).
 Well, at least, it would be easier to configure as a simple flag on
the endpoint could work.  If we use a single listener, we will have to
configure on the main servicemix.xml configuration file or register it
dynamically (from were?) ...

On 8/8/07, Gert Vanthienen (JIRA) <[EMAIL PROTECTED]> wrote:
>
>     [ 
> https://issues.apache.org/activemq/browse/SM-990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39880
>  ]
>
>
> Gert Vanthienen commented on SM-990:
> ------------------------------------
>
>
> I was thinking about some kind of WireTap (implemented as an Auditor to 
> easily apply it to all message), but I suppose you're worrying about the fact 
> that we need to ensure re-readability of the stream for this.  Would it be 
> possible to 'decorate' the NormalizedMessage somehow, so it  can intercept 
> when bytes are read from the inputstream by the provider and do the archiving 
> on-the-fly?
>
> > FilePoller with Archiving
> > -------------------------
> >
> >                 Key: SM-990
> >                 URL: https://issues.apache.org/activemq/browse/SM-990
> >             Project: ServiceMix
> >          Issue Type: Improvement
> >          Components: servicemix-components, servicemix-file
> >    Affects Versions: 3.1
> >            Reporter: Juergen Mayrbaeurl
> >            Priority: Minor
> >
> > The various FilePoller implementations should archive the files before 
> > deleting them (e.g. by copying them to another directory)
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Reply via email to