queenbee
queenbee

Reputation: 155

delete remote directory using apache camel

I came across Apache Camel today as I was thinking about implementing some basic Java routines for copying a directory to a remote server, and then running an MPI job, then on completion of the MPI job, deleting that directory. However, it seems more difficult than I thought - I spent the whole afternoon today simply trying to copy a directory to a remote machine via sftp (I still can't get it to copy a single file).

Basically, I'm wondering if Apache Camel is really the best java library/solution I should be using for my problem (as stated in my first sentence). I envisage mostly sftp/ssh communications (and on windows - through usual file sharing in an internal network), but may change this according to requirements. Perhaps Apache Camel doesn't fit my requirements, or is using a sledgehammer to crack a nut?

I would be grateful for any comments - unfortunately my networking knowledge is pretty limited outside basic usage.

Thanks!

Upvotes: 2

Views: 1025

Answers (2)

Petter Nordlander
Petter Nordlander

Reputation: 22279

Camel is more designed to handle continuously mediations of files/messages than doing such batch jobs.

I would probably implement the logic concerning directory creation/removal in pure java, using the JSCH library.

You can still use Camel to trigger/control the process - while implementing directory removal/creation/processing stuff in java. This could be great if you want to trigger this process using http or using a timer.

Upvotes: 1

Claus Ibsen
Claus Ibsen

Reputation: 55750

No you cannot delete the remote directory using the Camel ftp component.

Upvotes: 1

Related Questions