Skip to content

Custom dirty Session using RemoteFileTemplate? #2687

@alturkovic

Description

@alturkovic

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions