spring-projects / spring-projects/spring-integration

CachingSessionFactory - using different Pool strategies?

Open
#2,692 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: file in: sftp type: enhancement
Dominant language
Java
Stars
1.6k
Forks
1.2k
Avg merge
17h 48m
Merged PRs (30d)
62

Description

The current CSF implementation is tightly coupled to SimplePool. It would be nice to be able to use different Pool implementations for the CSF.

Currently, the problem is in 2 methods that CSF exposes which are coupled to SimplePool, namely:
public void setPoolSize(int poolSize)
and
public void setSessionWaitTimeout(long sessionWaitTimeout).

Would it be possible to change the SimplePool field to a generic Pool and add a new interface, PoolConfigurator with these specific methods to maintain backwards-compatibility and mark the coupled methods and the new PoolConfigurator as @Deprecated? This would keep backwards-compatibility for some time while allowing for different Pools to be used.

A more generic method for customization could be used in the future: public void configurePool(Pool pool). To be able to configure the pool from XML, maybe something like: public void configurePool(Expression expression)?

WDYT?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading CachingSessionFactory and its current SimplePool usage, especially setPoolSize(int) and setSessionWaitTimeout(long). Review the Pool and proposed PoolConfigurator responsibilities, including how pool configuration is represented in XML. Done means supporting alternate Pool implementations while preserving the stated backwards-compatibility requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.