Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ExpirationPolicy set to NeverExpire" logged endlessly #10

Open
bjansen opened this issue Sep 19, 2024 · 0 comments
Open

"ExpirationPolicy set to NeverExpire" logged endlessly #10

bjansen opened this issue Sep 19, 2024 · 0 comments

Comments

@bjansen
Copy link

bjansen commented Sep 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant