You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Demian Calcaprina <ca...@gmail.com> on 2011/02/01 21:22:35 UTC

Archive FTP File

Hi All,

I am working with servicemix-ftp and I need to use the "archive"
functionality, to backup the original files. The problem is that we have
servicemix-ftp-3.2.2, and the archive parameter is avaiable for newer
versions.

Could someone guide me to achieve it (make a backup of the original file)
without changing the servicemix-ftp version, but making it in my code?

I only have a service unit like this:
<ftp:poller service="content:ftpPoller"
        endpoint="hc-ftp-poller"
        targetService="content:service"
        deleteFile="true"
        uri="${hc.ftp.uri}"
        period="${ftp.poller.period}"
        recursive="false"
        marshaler="#binaryFileMarshaler" />

That forwards the file to the content:service su.

Thanks in advance,

Demian

Re: Archive FTP File

Posted by Demian Calcaprina <ca...@gmail.com>.
Thanks a lot for the advice.

I will have to try the workarounds for now and I hope we can upgrade to last
versions.

Regards,

Demian

On Tue, Feb 1, 2011 at 7:00 PM, Gert Vanthienen
<ge...@gmail.com>wrote:

> L.S.,
>
> Sorry, I misread that version there -- if you're using ServiceMix
> 3.2.2, it might not be so easy to upgrade a single component to a
> 20xx.yy version of the same component.  When we moved from ServiceMix
> 3.2.x to 3.3.x, we did significantly refactor the components to make
> them more independent from the underlying container, mainly because we
> wanted the component set to work with both ServiceMix 3 and ServiceMix
> 4.  If you're currently using 3.2.2 and have to stay with that version
> of the container, I'd rather look into using an eip wire tap or camel
> to add the intermediary archiving step to your message flow instead.
>
> If you ever have a chance to upgrade to a newer version of the
> container, it wouldn't be a bad thing to do as we're no longer
> actively maintaining the 3.2.x line (although the branches are still
> available in svn) and there's tons of new stuff available in the newer
> versions... (sorry for the 'promotional message' for our project here
> ;))
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> FuseSource
> Web: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> On Tue, Feb 1, 2011 at 9:59 PM, Demian Calcaprina <ca...@gmail.com>
> wrote:
> > Thanks for quick response.
> >
> > The problem is that the servicemix instance used is not mantained by us
> and
> > has another components that are currently using servicemix-ftp-3.2.2.
> >
> > Can we have any problem with the old components if we upgrade the
> version?
> >
> > Thanks again,
> >
> > Demian
> >
> > On Tue, Feb 1, 2011 at 5:49 PM, Gert Vanthienen
> > <ge...@gmail.com>wrote:
> >
> >> L.S.,
> >>
> >> If you need this feature, just upgrading the JBI component should work
> >> fine, however...
> >>
> >> You can also write a Camel route (or use servicemix-eip) to receive
> >> the message exchange and send it back to a FTP sender endpoint for
> >> archiving before or after you invoke the other other service
> >> endpoints.  If you set the targetService on your FTP poller to
> >> "content:router", the route looks something like this (replace the
> >> <content> bit by the actual namespace URI for the content prefix).
> >>
> >> from("jbi:service:<content>:router")
> >>  .to("jbi:service:<content>:archive")    --> this would be your FTP
> >> sender or File sender endpoint to archive the exchange
> >>  .to("jbi:service:<content>:service");   --> this is the actual
> >> service you want to send to
> >>
> >> Regards,
> >>
> >> Gert Vanthienen
> >> ------------------------
> >> FuseSource
> >> Web: http://fusesource.com
> >> Blog: http://gertvanthienen.blogspot.com/
> >>
> >>
> >>
> >> On Tue, Feb 1, 2011 at 9:22 PM, Demian Calcaprina <
> calcacuervo@gmail.com>
> >> wrote:
> >> > Hi All,
> >> >
> >> > I am working with servicemix-ftp and I need to use the "archive"
> >> > functionality, to backup the original files. The problem is that we
> have
> >> > servicemix-ftp-3.2.2, and the archive parameter is avaiable for newer
> >> > versions.
> >> >
> >> > Could someone guide me to achieve it (make a backup of the original
> file)
> >> > without changing the servicemix-ftp version, but making it in my code?
> >> >
> >> > I only have a service unit like this:
> >> > <ftp:poller service="content:ftpPoller"
> >> >        endpoint="hc-ftp-poller"
> >> >        targetService="content:service"
> >> >        deleteFile="true"
> >> >        uri="${hc.ftp.uri}"
> >> >        period="${ftp.poller.period}"
> >> >        recursive="false"
> >> >        marshaler="#binaryFileMarshaler" />
> >> >
> >> > That forwards the file to the content:service su.
> >> >
> >> > Thanks in advance,
> >> >
> >> > Demian
> >> >
> >>
> >
>

Re: Archive FTP File

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

Sorry, I misread that version there -- if you're using ServiceMix
3.2.2, it might not be so easy to upgrade a single component to a
20xx.yy version of the same component.  When we moved from ServiceMix
3.2.x to 3.3.x, we did significantly refactor the components to make
them more independent from the underlying container, mainly because we
wanted the component set to work with both ServiceMix 3 and ServiceMix
4.  If you're currently using 3.2.2 and have to stay with that version
of the container, I'd rather look into using an eip wire tap or camel
to add the intermediary archiving step to your message flow instead.

If you ever have a chance to upgrade to a newer version of the
container, it wouldn't be a bad thing to do as we're no longer
actively maintaining the 3.2.x line (although the branches are still
available in svn) and there's tons of new stuff available in the newer
versions... (sorry for the 'promotional message' for our project here
;))

Regards,

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



On Tue, Feb 1, 2011 at 9:59 PM, Demian Calcaprina <ca...@gmail.com> wrote:
> Thanks for quick response.
>
> The problem is that the servicemix instance used is not mantained by us and
> has another components that are currently using servicemix-ftp-3.2.2.
>
> Can we have any problem with the old components if we upgrade the version?
>
> Thanks again,
>
> Demian
>
> On Tue, Feb 1, 2011 at 5:49 PM, Gert Vanthienen
> <ge...@gmail.com>wrote:
>
>> L.S.,
>>
>> If you need this feature, just upgrading the JBI component should work
>> fine, however...
>>
>> You can also write a Camel route (or use servicemix-eip) to receive
>> the message exchange and send it back to a FTP sender endpoint for
>> archiving before or after you invoke the other other service
>> endpoints.  If you set the targetService on your FTP poller to
>> "content:router", the route looks something like this (replace the
>> <content> bit by the actual namespace URI for the content prefix).
>>
>> from("jbi:service:<content>:router")
>>  .to("jbi:service:<content>:archive")    --> this would be your FTP
>> sender or File sender endpoint to archive the exchange
>>  .to("jbi:service:<content>:service");   --> this is the actual
>> service you want to send to
>>
>> Regards,
>>
>> Gert Vanthienen
>> ------------------------
>> FuseSource
>> Web: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>>
>>
>>
>> On Tue, Feb 1, 2011 at 9:22 PM, Demian Calcaprina <ca...@gmail.com>
>> wrote:
>> > Hi All,
>> >
>> > I am working with servicemix-ftp and I need to use the "archive"
>> > functionality, to backup the original files. The problem is that we have
>> > servicemix-ftp-3.2.2, and the archive parameter is avaiable for newer
>> > versions.
>> >
>> > Could someone guide me to achieve it (make a backup of the original file)
>> > without changing the servicemix-ftp version, but making it in my code?
>> >
>> > I only have a service unit like this:
>> > <ftp:poller service="content:ftpPoller"
>> >        endpoint="hc-ftp-poller"
>> >        targetService="content:service"
>> >        deleteFile="true"
>> >        uri="${hc.ftp.uri}"
>> >        period="${ftp.poller.period}"
>> >        recursive="false"
>> >        marshaler="#binaryFileMarshaler" />
>> >
>> > That forwards the file to the content:service su.
>> >
>> > Thanks in advance,
>> >
>> > Demian
>> >
>>
>

Re: Archive FTP File

Posted by Demian Calcaprina <ca...@gmail.com>.
Thanks for quick response.

The problem is that the servicemix instance used is not mantained by us and
has another components that are currently using servicemix-ftp-3.2.2.

Can we have any problem with the old components if we upgrade the version?

Thanks again,

Demian

On Tue, Feb 1, 2011 at 5:49 PM, Gert Vanthienen
<ge...@gmail.com>wrote:

> L.S.,
>
> If you need this feature, just upgrading the JBI component should work
> fine, however...
>
> You can also write a Camel route (or use servicemix-eip) to receive
> the message exchange and send it back to a FTP sender endpoint for
> archiving before or after you invoke the other other service
> endpoints.  If you set the targetService on your FTP poller to
> "content:router", the route looks something like this (replace the
> <content> bit by the actual namespace URI for the content prefix).
>
> from("jbi:service:<content>:router")
>  .to("jbi:service:<content>:archive")    --> this would be your FTP
> sender or File sender endpoint to archive the exchange
>  .to("jbi:service:<content>:service");   --> this is the actual
> service you want to send to
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> FuseSource
> Web: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> On Tue, Feb 1, 2011 at 9:22 PM, Demian Calcaprina <ca...@gmail.com>
> wrote:
> > Hi All,
> >
> > I am working with servicemix-ftp and I need to use the "archive"
> > functionality, to backup the original files. The problem is that we have
> > servicemix-ftp-3.2.2, and the archive parameter is avaiable for newer
> > versions.
> >
> > Could someone guide me to achieve it (make a backup of the original file)
> > without changing the servicemix-ftp version, but making it in my code?
> >
> > I only have a service unit like this:
> > <ftp:poller service="content:ftpPoller"
> >        endpoint="hc-ftp-poller"
> >        targetService="content:service"
> >        deleteFile="true"
> >        uri="${hc.ftp.uri}"
> >        period="${ftp.poller.period}"
> >        recursive="false"
> >        marshaler="#binaryFileMarshaler" />
> >
> > That forwards the file to the content:service su.
> >
> > Thanks in advance,
> >
> > Demian
> >
>

Re: Archive FTP File

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

If you need this feature, just upgrading the JBI component should work
fine, however...

You can also write a Camel route (or use servicemix-eip) to receive
the message exchange and send it back to a FTP sender endpoint for
archiving before or after you invoke the other other service
endpoints.  If you set the targetService on your FTP poller to
"content:router", the route looks something like this (replace the
<content> bit by the actual namespace URI for the content prefix).

from("jbi:service:<content>:router")
  .to("jbi:service:<content>:archive")    --> this would be your FTP
sender or File sender endpoint to archive the exchange
  .to("jbi:service:<content>:service");   --> this is the actual
service you want to send to

Regards,

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



On Tue, Feb 1, 2011 at 9:22 PM, Demian Calcaprina <ca...@gmail.com> wrote:
> Hi All,
>
> I am working with servicemix-ftp and I need to use the "archive"
> functionality, to backup the original files. The problem is that we have
> servicemix-ftp-3.2.2, and the archive parameter is avaiable for newer
> versions.
>
> Could someone guide me to achieve it (make a backup of the original file)
> without changing the servicemix-ftp version, but making it in my code?
>
> I only have a service unit like this:
> <ftp:poller service="content:ftpPoller"
>        endpoint="hc-ftp-poller"
>        targetService="content:service"
>        deleteFile="true"
>        uri="${hc.ftp.uri}"
>        period="${ftp.poller.period}"
>        recursive="false"
>        marshaler="#binaryFileMarshaler" />
>
> That forwards the file to the content:service su.
>
> Thanks in advance,
>
> Demian
>