diff --git a/docs/src/reference/docbook/ftp.xml b/docs/src/reference/docbook/ftp.xml index a04298b97e..b70ead9acb 100644 --- a/docs/src/reference/docbook/ftp.xml +++ b/docs/src/reference/docbook/ftp.xml @@ -47,6 +47,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp + ]]> @@ -74,6 +75,22 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp ]]> + + + Stale session and session pooling + + + + Every time an adapter requests a session object from the DefaultFtpClientFactory or DefaultFtpsClientFactory the session is + returned from the default session pool maintained by these factories. Session in the session pool might go stale + (session that were disconnected by the server due to inactivity) so DefaultFtpClientFactory or DefaultFtpsClientFactory + will perform validation to make sure that they never return stale session to the adapter. If stale session was encountered + it will be removed form the pool and the new one will be created. + + If you experience connectivity problems and would like to trace session creation as well as see which session are + polled you may enable it by setting logger to TRACE level (e.g., log4j.category.org.springframework.integration.ftp=DEBUG) + + Now all you need to do is inject these session factories into your adapters. Obviously the protocol (FTP or FTPS) that an adapter will @@ -131,7 +148,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp Some times the file that just appeared in the monitored (remote) directory is not complete. Typically such a file - will be written with some temporary extension (e.g., foo.txt.writing) and then renamed after the writing process finished. + will be written with temporary extension (e.g., foo.txt.writing) and then renamed after the writing process finished. As a user in most cases you are only interested in files that are complete and would like to filter only files that are complete. To handle these scenarios you can use the filtering support provided by the filename-pattern, filename-regex and filter attributes. Here is an example that uses a custom Filter implementation.