In the previous post under Apache Pool, I showed you with example how to use PooledObjectFactory interface to create an object pool. In this post I will show how to use “BasePooledObjectFactory” class provided Apache Pool framework. We created our own implementation of PooledObjectFactory interface in the previous post as shown below. I have added…… Continue reading BasePooledObjectFactory class Example
Month: December 2021
Creating Object Pool
In this post under Apache Pool, I will show with simple example how to create a pool of objects. We need the below jar in our classpath to use Apache Pool frameworkcommons-pool2 We need to know about 3 Apache Pool interface1) ObjectPool –> manages pool of objects2) PooledObjectFactory –> takes responsibility of creating and destroying…… Continue reading Creating Object Pool
Adding StatisticsListener (using xml configuration)
In this post under Spring Retry, I will show with example how to add Spring Retry’s StatisticsListener class into your application. StatisticsListener class provided by Spring Retry framework collects statistics of a particular retry operations. The statistics information involves1) Abort Count –> How many times the retry was aborted2) Complete Count –> How many times…… Continue reading Adding StatisticsListener (using xml configuration)