Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="85a5c9f22ebff9f5-9f54622d-45694f15-92a0a2e8-3283f55168939fb70dd5f426"><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] A lot of information is available on the [http://jakarta.apache.org/commons/pool/ Pool website]. If you don't find the information you need you can always contact us using one of the [http://jakarta.apache.org/site/mail2.html#Commons mailing lists].

]]></ac:plain-text-body></ac:structured-macro>

...

Add your questions/answers here.

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 synchronized.

Q: What is the general purpose of pooling Interfaces ?

Wiki Markup
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\].

...