Glassfish ESB sFTP support

5 messages Options
Embed this post
Permalink
dvsridhar

Glassfish ESB sFTP support

Reply Threaded More More options
Print post
Permalink
Hi,
I need a suggestion on how to address this issue. I understand SFTP support is still in the works with glassfishesb. I am wondering if i could use any open source util to achieve this functionality. I found 2 useful links in this regard one is open source and other one is commercial.

SSHTools:
http://sourceforge.net/projects/sshtools/

JScape (Commercial):
http://www.jscape.com/sftp/index.html

I am planning to have an EJB which accepts a string (FileBC creates this string polling to a directory) and uses any of the above API's to sftp the data. Do you see any runtime issues with this approach especially with size limitation of the file for example 1GB or 2GB etc..

We don't use FTP server, our organization prefer SFTP over FTPS otherwise I would have used FTPBC to achieve this task.

Please help me to resolve this issue.

Regards,
Sridhar
Andreas Egloff

Re: Glassfish ESB sFTP support

Reply Threaded More More options
Print post
Permalink
The string you are passing, is it the data, or a file name/path?

If it's the data, I don't see a technical issue with you doing a manual
sFTP transfer from either EJB or the POJO SE. Especially if you are ok
to initiate and tear down the connection for each invocation it should
be pretty straight forward; otherwise it will just incur some more work
to manage the connection appropriately.

You mention sizes of 2 GB, you will need to handle the data as
attachment rather than parsing it into DOM.

If you're passing around file names, you're (probably) still ok, with
some items to be aware of. File access within an EJB will limit
portability (and is controversial, theoretically disallowed by the
spec), but practically as long as you know you will have uniform file
system access on all AS instances and are ok with being tied to your
specific set-up technically it should be ok as most AS do not enforce this.

At the same time also be aware that you are responsible for getting the
appropriate delivery guarantees. You can not (at least not easily)
participate in XA. Let's assume the system is set up for at-least-once
delivery, it means that theoretically the same message could arrive
twice at your logic. If it's because the previous transfer failed, you
will want to re-do the transfer. If it was already transferred
successfully, maybe you're ok with it getting re-done in this infrequent
circumstance to keep it simple. For ultimate robustness also consider
making the system resilient to the duplicate message arriving whilst the
first is still in progress. Depending on your scenario and topology that
can be a very rare use case.

Also, assuming you want at-least-once delivery, do not "ACK" until the
transfer is completed successfully (and hence the original file does not
get removed/archived until then). Currently you do not have another
choice in EJB, so you're good. For POJO SE in asynchronous mode you have
that choice, so just be aware.

HTH,
Andi

dvsridhar wrote:

> Hi,
> I need a suggestion on how to address this issue. I understand SFTP support
> is still in the works with glassfishesb. I am wondering if i could use any
> open source util to achieve this functionality. I found 2 useful links in
> this regard one is open source and other one is commercial.
>
> SSHTools:
> http://sourceforge.net/projects/sshtools/
>
> JScape (Commercial):
> http://www.jscape.com/sftp/index.html
>
> I am planning to have an EJB which accepts a string (FileBC creates this
> string polling to a directory) and uses any of the above API's to sftp the
> data. Do you see any runtime issues with this approach especially with size
> limitation of the file for example 1GB or 2GB etc..
>
> We don't use FTP server, our organization prefer SFTP over FTPS otherwise I
> would have used FTPBC to achieve this task.
>
> Please help me to resolve this issue.
>
> Regards,
> Sridhar
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Mark S White

Re: Glassfish ESB sFTP support

Reply Threaded More More options
Print post
Permalink
In reply to this post by dvsridhar
Here is another option, there is a commercial sFTP binding component
offered by nSoftware:

http://n2.nabble.com/Adapters-by-n-software-OpenESB-users-feedback-requested-tp3778850ef794670.html


dvsridhar wrote:.

> Hi,
> I need a suggestion on how to address this issue. I understand SFTP support
> is still in the works with glassfishesb. I am wondering if i could use any
> open source util to achieve this functionality. I found 2 useful links in
> this regard one is open source and other one is commercial.
>
> SSHTools:
> http://sourceforge.net/projects/sshtools/
>
> JScape (Commercial):
> http://www.jscape.com/sftp/index.html
>
> I am planning to have an EJB which accepts a string (FileBC creates this
> string polling to a directory) and uses any of the above API's to sftp the
> data. Do you see any runtime issues with this approach especially with size
> limitation of the file for example 1GB or 2GB etc..
>
> We don't use FTP server, our organization prefer SFTP over FTPS otherwise I
> would have used FTPBC to achieve this task.
>
> Please help me to resolve this issue.
>
> Regards,
> Sridhar
>  

--
OpenESB Community (http://open-esb.org)
Check out my blog (http://blogs.sun.com/mwhite)


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Cole, Corey

RE: Glassfish ESB sFTP support

Reply Threaded More More options
Print post
Permalink
In reply to this post by dvsridhar
JSch (http://www.jcraft.com/jsch/) has been around for a while.  I've used it in past
with eGate 4.x/5.x.  The API isn't all that great (I don't like the way it does password input),
but it gets the job done and is kept up to date.

There's another open source project, but it appears that the authors have discontinued support:
Trilead had a Java SSH (including SFTP) implementation that they had written for use in a
VMware tool that they sold.  They even offered commercial support for the library.
The latest version I'm aware of is Build 213.

IMO Trilead had a better API, probably because it was a focused library that was part of a commercial tool...

Here's the MD5 hash for the copy I've got.  Perhaps you can find a version on some mirror site
somewhere.

757c1c1d7bf0e0f0b80df67b3ea3e4c6 *trilead-ssh2-build213.jar

-----Original Message-----
From: dvsridhar [mailto:[hidden email]]
Sent: Wednesday, October 21, 2009 1:26 AM
To: [hidden email]
Subject: Glassfish ESB sFTP support


Hi,
I need a suggestion on how to address this issue. I understand SFTP support
is still in the works with glassfishesb. I am wondering if i could use any
open source util to achieve this functionality. I found 2 useful links in
this regard one is open source and other one is commercial.

SSHTools:
http://sourceforge.net/projects/sshtools/

JScape (Commercial):
http://www.jscape.com/sftp/index.html

I am planning to have an EJB which accepts a string (FileBC creates this
string polling to a directory) and uses any of the above API's to sftp the
data. Do you see any runtime issues with this approach especially with size
limitation of the file for example 1GB or 2GB etc..

We don't use FTP server, our organization prefer SFTP over FTPS otherwise I
would have used FTPBC to achieve this task.

Please help me to resolve this issue.

Regards,
Sridhar
--
View this message in context: http://n2.nabble.com/Glassfish-ESB-sFTP-support-tp3863869p3863869.html
Sent from the OpenESB Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Jim Fu

Re: Glassfish ESB sFTP support

Reply Threaded More More options
Print post
Permalink
In reply to this post by dvsridhar
Sridhar,

it seems to me sshtools are more popular...

you can use EJB or POJO se to do the SFTP put / get - sshtools has
stream IO APIs so it should not be a problem to either write out 1GB or
3GB...
however, for now, filebc still read the whole content as the inbound
message payload unless the inbound has been specified as containing
multiple-records...
in another words, if the 1GB, 2GB input files can be further delimited
into records (say, 3KB), and your biz logic is record oriented, then
there shouldn't be memory issue.

HTH
regards

Jim

> Hi,
> I need a suggestion on how to address this issue. I understand SFTP support
> is still in the works with glassfishesb. I am wondering if i could use any
> open source util to achieve this functionality. I found 2 useful links in
> this regard one is open source and other one is commercial.
>
> SSHTools:
> http://sourceforge.net/projects/sshtools/
>
> JScape (Commercial):
> http://www.jscape.com/sftp/index.html
>
> I am planning to have an EJB which accepts a string (FileBC creates this
> string polling to a directory) and uses any of the above API's to sftp the
> data. Do you see any runtime issues with this approach especially with size
> limitation of the file for example 1GB or 2GB etc..
>
> We don't use FTP server, our organization prefer SFTP over FTPS otherwise I
> would have used FTPBC to achieve this task.
>
> Please help me to resolve this issue.
>
> Regards,
> Sridhar
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]