使用ftp适配器时的最大同时连接数

使用ftp适配器时的最大同时连接数,ftp,spring-integration,Ftp,Spring Integration,我可以调整什么来解决这个最大连接问题?有没有办法指定一个限制? 这来自Spring集成应用程序 <int-ftp:outbound-channel-adapter id="matasLiveProdSdkOutbound" channel="ftpOutboundChannel" session-factory="ftpsSessionF

我可以调整什么来解决这个最大连接问题?有没有办法指定一个限制? 这来自Spring集成应用程序

 <int-ftp:outbound-channel-adapter id="matasLiveProdSdkOutbound"
                                      channel="ftpOutboundChannel"
                                      session-factory="ftpsSessionFactory"
                                      charset="UTF-8"
                                      auto-create-directory="true"
                                      use-temporary-file-name="false"
                                      remote-file-separator="/"
                                      remote-directory-expression="${egnyte.remote.dir}"
                                      mode="IGNORE">
</int-ftp:outbound-channel-adapter>
编辑:添加CachingSessionFactory,就像Gary建议我的那样

@Bean
    public CachingSessionFactory ftpsCachingSessionFactory(DefaultFtpsSessionFactory ftpsSessionFactory) {
        CachingSessionFactory cachingSessionFactory = new CachingSessionFactory(ftpsSessionFactory, 5);
        cachingSessionFactory.setSessionWaitTimeout(1000);
        return cachingSessionFactory;
    }

我将ftps会话工厂包装在一个CachingSessionFactory中。现在,当我从上面的ftp出站适配器引用这个bean时,我得到一个错误,告诉我这个bean必须是AbstractFtpSessionFactory类型。在FTP出站适配器中不可能使用FTPS缓存会话工厂吗?如上所述?我找不到任何用于切换适配器的int-ftps命名空间。spring-integration-ftp-4.1xsd预期只接受org.springframework.integration.ftp.session.DefaultFtpSessionFactory。

将会话工厂包装在
cachingsSessionFactory
中。使用它可以限制会话的数量


另请参见。

当然。。。我怎么会错过呢!?谢谢我现在在尝试将cachingSessionFactory与ftp出站通道适配器一起使用时遇到类型不匹配的问题。见我编辑的问题。难道不可能开箱即用地解决这个问题吗?我忽略了这个错误,它实际上正在工作。我猜xsd并不完整,只定义了对[org.springframework.integration.sftp.session.DefaultSftpSessionFactory]bean的引用。作为预期的类型(?)哦,您是指IDE中的架构验证错误。正如您所发现的,这不是运行时错误,它只是IDE的一个(错误)提示,可以忽略。我已经打开了一个修复程序。以这种方式配置缓存在2011年发生了变化,所以我有点惊讶以前没有人报告过这一点。谢谢
@Bean
    public CachingSessionFactory ftpsCachingSessionFactory(DefaultFtpsSessionFactory ftpsSessionFactory) {
        CachingSessionFactory cachingSessionFactory = new CachingSessionFactory(ftpsSessionFactory, 5);
        cachingSessionFactory.setSessionWaitTimeout(1000);
        return cachingSessionFactory;
    }