-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
I needed to implement a CachingSessionFactory but using a different kind of Pool. Currently, CachingSessionFactory uses SimplePool in the constructor. I needed a pool which does some checks and synchronization over Redis. More specifically, I need to make sure I do not open more than X sessions toward one FTP server at any time. Since I am using this in a distributed environment, SimplePool does not meet my needs.
I've created a new Factory, but now I cannot mark my Session dirty because of the instance check in RemoteFileTemplate.execute(SessionCallback). Would it be possible to change this instance check from CachingSessionFactory<?>.CachedSession to a new interface like DirtySession so we can have custom Session implementations which can be marked dirty on exception?