[jcifs] Persistent Session

john.dunlap at exceter.com john.dunlap at exceter.com
Mon May 11 12:56:44 GMT 2009


I have a Tomcat server which connects to a windows file server to
upload/download documents. I'm using JCIFS to do this. What I have been
noticing is that it takes 2-3 seconds to establish the connection, after
which point the transfer is very fast. Transfers with immediately follow
the first are also fast. After a little while the session times out and the
next request again takes 2-3 seconds to go through. As my application
doesn't have a lot of traffic this essentially means that every request
will take 2-3 seconds. So, I have two questions,

1) Should it take 2-3 seconds to establish a connection or do I have a
configuration problem?
2) If the answer to number 1 is no, how do I hold the session open
indefinitely? Individual users do not connect directly to the file server
so this would only result in a single connection. It has occurred to me
that I could schedule a job in Spring which queries the server for a
directory listing every so often but it seems like there should be a better
way to go about this.

Any thoughts or suggestions would be greatly appreciated.


More information about the jcifs mailing list