Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-69

[pool] proposed PoolableObjectFactorys JavaDoc changes for 2.0

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.3
    • None
    • Operating System: All
      Platform: All

    • 38664

    Description

      Attached are the pool 2.0 changes I'd like to see to the PoolableObjectFactory
      and the KeyedPoolableObjectFactory interfaces. The noteworthy changes are:

      • activateObject is to be invoked on previously idle objects, not object created
        with makeObject.
      • validateObject is to only be invoked on "active" objects. validateObject will
        be called before the pool returns a borrowed object. The pool may call
        validateObject when objects are being returned to the pool or by and idle
        eviction code.
      • no guarantee about the condition of objects passed to destroyObject method.
        They could be active, passive, valid, or invalid.
      • PoolableObjectFactorys must be thread-safe. The only promise an ObjectPool
        makes is that the same instance of an object will not be passed to more than one
        method of a PoolableObjectFactorys at a time.

      For the last item I think we should provide a synchronization wrapper for
      PoolableObjectFactorys much like java.util.Collections has a
      synchronizedCollection method.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--PoolableObjectFactorys-javadoc.patch
          6 kB
          Sandy McArthur (from Bugzilla import)

        Activity

          People

            Unassigned Unassigned
            sandymac@apache.org Sandy McArthur (from Bugzilla import)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: