Skip to content

"ExpirationPolicy set to NeverExpire" logged endlessly #10

@bjansen

Description

@bjansen

Hi,

I'm trying to set up a clustered-object-pool with no expiration policy to maintain a pool of reusable TCP connections. I use .defaultExpirationPolicy(null) to use NeverExpirePolicy, but the deallocator thread keeps logging these over and over:

[pool-1-thread-2] INFO org.bbottema.genericobjectpool.GenericObjectPool - ExpirationPolicy set to NeverExpire, Skipping invalidation of expired objects!
[pool-1-thread-2] INFO org.bbottema.genericobjectpool.GenericObjectPool - ExpirationPolicy set to NeverExpire, Skipping invalidation of expired objects!
[pool-1-thread-2] INFO org.bbottema.genericobjectpool.GenericObjectPool - ExpirationPolicy set to NeverExpire, Skipping invalidation of expired objects!
[pool-1-thread-2] INFO org.bbottema.genericobjectpool.GenericObjectPool - ExpirationPolicy set to NeverExpire, Skipping invalidation of expired objects!

Maybe this could be logged only once, or using the TRACE level?

As a workaround, I'm using .defaultExpirationPolicy(obj -> false) which does the same thing as NeverExpirePolicy, but the deallocator still has to check objects one by one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions