PDA

View Full Version : Object pooling


mihalcea_vlad
08-25-2005, 06:16 PM
I think it would be great if I can declare the object pooling feature from within the XML configuration file. What I mean is that beside having the singleton = true/false, we should have another property called pooling = true/false, and maybe another one to declare the pooling capacity. It's better to have this feature from the core, and just setup the container with the number of the pooled objects. :idea:

Mark Pollack
08-25-2005, 11:56 PM
Hi,

Object pooling is currently exposed in the XML through use of a TargetSource (http://www.springframework.net/doc/reference/html/aop.html#aop-targetsource) within the AOP framework. Your point though is well taken. Both Spring teams (Java and .NET) are working on allowing for more "domain specific" extensions to the XML configuration as well as easy programmatic configuration to give you some more options and reduce the verbosity of the current XML for common tasks. Pointcut definitions based on attributes would be really nice in this situation and would mimic exisiting usage with EnterpriseService.ServicedComponent.

In the meantime, try out SimplePoolTargetSource (http://www.springframework.net/doc/api/html/Spring.Aop.Target.SimplePoolTargetSource.html) and see how you like it.

Thanks for the feedback.

Cheers,
Mark