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

Proxy support for pooled objects

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6, 2.0
    • Fix Version/s: 2.0
    • Labels:

      Description

      Attached are files and tests that would allow users of commons-pool to interact with a proxy to the pooled object rather than the pooled object itself. This provides two benefits: detection of leaked pooled objects (when returnObject() isn't called) with a stack trace and detection of using pooled objects after they have been returned to the pool. The system provides a delegate which can be placed in front of any ObjectPool, similar to calling Collections.unmodifiableCollection(). Callers do not know that they're working with a proxy rather than the pooled object itself. Implementations are provided to use Java proxies or CGLib (useful when the pooled object doesn't implement an interface). Unit tests are also provided.

        Attachments

        1. test.jar
          3 kB
          Brad Koehn
        2. src.jar
          5 kB
          Brad Koehn

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              koehn Brad Koehn
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified