Pool Overview
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="00a97adc-aca6-430a-b733-335de97e30c1"><ac:plain-text-body><![CDATA[ {{ http://jakarta.apache.org/commons/pool/images/pool-logo-white.png}} | [http://jakarta.apache.org/commons/pool/ Commons-Pool] provides a generic object pooling interface, a toolkit for creating modular object pools and several general purpose pool implementations.[BR] | ]]></ac:plain-text-body></ac:structured-macro> |
External Resources
Do you have a good example, add it here! |
Articles
\[http://www.devx.com/Java/Article/30117 Extend the JDK Classes with Jakarta Commons, Part III\] - Explore Jakarta Commons components that enable you to parse arguments in a command-line application, connect to various file systems at the same time, allow an application to uniformly access configurations loaded from various sources, and pool covers any object. \\Wiki Markup
FAQ
...
Q: How can I reinitialize GenericObjectPool after a network failure? (factory = PoolableConnectionFactory)
Q: If I have multiple threads calling into my method which contains the borrowObject call, do I have to synchronize around this, or are borrowObject and returnObject thread safe?
A: They appear to be thread safe. I haven't extensively studied the source the relevant code is synchronizedIt's implementation dependent. The implementations that come in the official download are thread safe. Of course it is possible this may change in the future if new implementations are added to the package. Be sure to check the JavaDocs.
Q: What is the general purpose of pooling Interfaces ?
A: ''You don't pool interfaces but objects implementing the interfaces. An object pool is used to reduce the cost of creating/destroying the pooled object (memory,CPU and other resources). Commons-Pool provides several general purpose implementations of different pooling strategies. See also \[http://jakarta.apache.org/commons/pool/guide/index.html developers guide\]. Wiki Markup
...
...