Skip to content

CachingSessionFactory - using different Pool strategies? #2692

Open
@alturkovic

Description

@alturkovic

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions