Connection pooling

67 views
Skip to first unread message

Jozef Matejička

unread,
Mar 8, 2018, 3:33:27 AM3/8/18
to sshj-users
I am building web server.

I have integration with 3rd party server exchanging files over SFTP. For that I am using sshj.

I have just learned that I cannot reuse SSHClient.

What is recommended way then? Every time I would like to upload/download file must I establish and close connection? I would prefer to keep open connection open to amortize connection establishment.

Thank you for your suggestions!


Jeroen van Erp

unread,
Mar 8, 2018, 3:50:23 AM3/8/18
to sshj-...@googlegroups.com
You cannot reconnect using the same sshclient. However you can pool a number of clients and reuse them, as long as you don't disconnect.

Regards, Jeroen 

Op 8 mrt. 2018 09:33 schreef "Jozef Matejička" <matej...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "sshj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sshj-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jozef Matejička

unread,
Mar 8, 2018, 11:39:02 AM3/8/18
to sshj-users
Thanks, I will use it until I got exception, than try to close it and replace it with new one.
To unsubscribe from this group and stop receiving emails from it, send an email to sshj-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages