INT-3082 (S)FTP Remove Deprecated 'cache-sessions'
The 'cache-sessions' attribute was deprecated in 2.1 in favor of using a configured CachingConnectionFactory to provide more flexibility, such as setting the cache size. Remove the attribute from the schemas. Update tests. Add docs. Update Migration Guide on the project Wiki.
This commit is contained in:
@@ -35,6 +35,9 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp
|
||||
|
||||
<section id="ftp-session-factory">
|
||||
<title>FTP Session Factory</title>
|
||||
<important>
|
||||
Starting with version 3.0, sessions are no longer cached by default. See <xref linkend="ftp-session-caching"/>.
|
||||
</important>
|
||||
<para>
|
||||
Before configuring FTP adapters you must configure an <emphasis>FTP Session Factory</emphasis>. You can configure
|
||||
the <emphasis>FTP Session Factory</emphasis> with a regular bean definition where the implementation class is <classname>org.springframework.integration.ftp.session.DefaultFtpSessionFactory</classname>:
|
||||
@@ -446,14 +449,17 @@ protected void postProcessClientBeforeConnect(T client) throws IOException {
|
||||
</section>
|
||||
<section id="ftp-session-caching">
|
||||
<title>FTP Session Caching</title>
|
||||
<important>
|
||||
Starting with version 3.0, sessions are no longer cached by default; the <code>cache-sessions</code> attribute
|
||||
is no longer supported on endpoints. You must now use a <classname>CachingSessionFactory</classname> (see below) if you
|
||||
wish to cache sessions.
|
||||
</important>
|
||||
<para>
|
||||
As of version 2.1 we've exposed more flexibility with regard to session management for remote file adapters (e.g., FTP, SFTP etc).
|
||||
In previous versions the sessions were cached automatically by default. We did expose a <code>cache-sessions</code> attribute for
|
||||
disabling the auto caching, but that solution did not provide a way to configure other session caching attributes. For example, one
|
||||
of the requested features was to support a limit on the number of sessions created since a remote server may impose a limit on the
|
||||
number of client connections. To support that requirement and other configuration options, we decided to promote explicit definition
|
||||
of the <classname>CachingSessionFactory</classname> instance. That provides the <code>sessionCacheSize</code> and <code>sessionWaitTimeout</code>
|
||||
properties. As its name suggests, the <code>sessionCacheSize</code> property controls how many active sessions this adapter will
|
||||
In versions prior to 3.0, the sessions were cached automatically by default. A <code>cache-sessions</code> attribute was available for
|
||||
disabling the auto caching, but that solution did not provide a way to configure other session caching attributes. For example,
|
||||
you could not limit on the number of sessions created. To support that requirement and other configuration options, a
|
||||
<classname>CachingSessionFactory</classname> was provided. It provides <code>sessionCacheSize</code> and <code>sessionWaitTimeout</code>
|
||||
properties. As its name suggests, the <code>sessionCacheSize</code> property controls how many active sessions the factory will
|
||||
maintain in its cache (the DEFAULT is unbounded). If the <code>sessionCacheSize</code> threshold has been reached, any attempt to
|
||||
acquire another session will block until either one of the cached sessions becomes available or until the wait time for a Session
|
||||
expires (the DEFAULT wait time is Integer.MAX_VALUE). The <code>sessionWaitTimeout</code> property enables configuration of that value.
|
||||
|
||||
@@ -31,6 +31,9 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
|
||||
|
||||
<section id="sftp-session-factory">
|
||||
<title>SFTP Session Factory</title>
|
||||
<important>
|
||||
Starting with version 3.0, sessions are no longer cached by default. See <xref linkend="sftp-session-caching"/>.
|
||||
</important>
|
||||
<para>
|
||||
Before configuring SFTP adapters, you must configure an <emphasis>SFTP Session
|
||||
Factory</emphasis>. You can configure the <emphasis>SFTP Session
|
||||
@@ -179,14 +182,17 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
|
||||
|
||||
<section id="sftp-session-caching">
|
||||
<title>SFTP Session Caching</title>
|
||||
<important>
|
||||
Starting with version 3.0, sessions are no longer cached by default; the <code>cache-sessions</code> attribute
|
||||
is no longer supported on endpoints. You must now use a <classname>CachingSessionFactory</classname> (see below) if you
|
||||
wish to cache sessions.
|
||||
</important>
|
||||
<para>
|
||||
As of version 2.1 we've exposed more flexibility with regard to session management for remote file adapters (e.g., FTP, SFTP etc).
|
||||
In previous versions the sessions were cached automatically by default. We did expose a <code>cache-sessions</code> attribute for
|
||||
disabling the auto caching, but that solution did not provide a way to configure other session caching attributes. For example, one
|
||||
of the requested features was to support a limit on the number of sessions created since a remote server may impose a limit on the
|
||||
number of client connections. To support that requirement and other configuration options, we decided to promote explicit definition
|
||||
of the <classname>CachingSessionFactory</classname> instance. That provides the <code>sessionCacheSize</code> and <code>sessionWaitTimeout</code>
|
||||
properties. As its name suggests, the <code>sessionCacheSize</code> property controls how many active sessions this adapter will
|
||||
In versions prior to 3.0, the sessions were cached automatically by default. A <code>cache-sessions</code> attribute was available for
|
||||
disabling the auto caching, but that solution did not provide a way to configure other session caching attributes. For example,
|
||||
you could not limit on the number of sessions created. To support that requirement and other configuration options, a
|
||||
<classname>CachingSessionFactory</classname> was provided. It provides <code>sessionCacheSize</code> and <code>sessionWaitTimeout</code>
|
||||
properties. As its name suggests, the <code>sessionCacheSize</code> property controls how many active sessions the factory will
|
||||
maintain in its cache (the DEFAULT is unbounded). If the <code>sessionCacheSize</code> threshold has been reached, any attempt to
|
||||
acquire another session will block until either one of the cached sessions becomes available or until the wait time for a Session
|
||||
expires (the DEFAULT wait time is Integer.MAX_VALUE). The <code>sessionWaitTimeout</code> property enables configuration of that value.
|
||||
|
||||
@@ -106,8 +106,23 @@
|
||||
URI-schemes supported by Spring Web Services. For more information see <xref linkend="outbound-uri"/>.
|
||||
</para>
|
||||
</section>
|
||||
<section id="3.0-ftp-cache-changes">
|
||||
<title>FTP, SFTP and FTPS Cached Sessions</title>
|
||||
<para>
|
||||
The FTP, SFTP and FTPS endpoints no longer cache sessions by default.
|
||||
</para>
|
||||
<para>
|
||||
The deprecated <code>cached-sessions</code> attribute has been removed from all endpoints.
|
||||
Previously, the embedded caching mechanism controlled by this attribute's value didn't
|
||||
provide a way to limit the size of the cache, which could
|
||||
grow indefinitely. The <classname>CachingConnectionFactory</classname> was introduced in
|
||||
release 2.1 and it became the preferred (and is now the only) way to cache sessions.
|
||||
For more information, see
|
||||
<xref linkend="ftp-session-caching"/> and <xref linkend="sftp-session-caching"/>.
|
||||
</para>
|
||||
</section>
|
||||
<section id="3.0-xFTP-ib">
|
||||
<title>(S)FTP(S) Inbound Adapters</title>
|
||||
<title>FTP, SFTP and FTPS Inbound Adapters</title>
|
||||
<para>
|
||||
Previously, there was no way to override the default filter used to process files retrieved
|
||||
from a remote server. The <code>filter</code> attribute determines which files are retrieved
|
||||
@@ -128,7 +143,7 @@
|
||||
</para>
|
||||
</section>
|
||||
<section id="3.0-xFTP-gw">
|
||||
<title>(S)FTP(S) Gateways</title>
|
||||
<title>FTP, SFTP and FTPS Gateways</title>
|
||||
<para>
|
||||
The gateways now support the <code>mv</code> command, enabling the renaming of remote
|
||||
files.
|
||||
|
||||
Reference in New Issue
Block a user