uk.co.lakesidetech.springxmldb.connectionpool
Class PoolableCollection

java.lang.Object
  extended byuk.co.lakesidetech.springxmldb.connectionpool.DelegatingCollection
      extended byuk.co.lakesidetech.springxmldb.connectionpool.PoolableCollection
All Implemented Interfaces:
org.xmldb.api.base.Collection, org.xmldb.api.base.Configurable

public class PoolableCollection
extends DelegatingCollection
implements org.xmldb.api.base.Collection

A delegating collection class than overides the collection close which it uses to check back into a object pool

Author:
Stuart Eccles

Field Summary
 
Fields inherited from class uk.co.lakesidetech.springxmldb.connectionpool.DelegatingCollection
collection
 
Constructor Summary
PoolableCollection(org.xmldb.api.base.Collection col, org.apache.commons.pool.KeyedObjectPool pool, java.lang.String key)
          Constuctor to create a poolable collection supplying references to the underlying collection, the pool checked out of and the pool key
 
Method Summary
 void close()
          Overriden to check back into the pool instead of closing the collection connection
 
Methods inherited from class uk.co.lakesidetech.springxmldb.connectionpool.DelegatingCollection
createId, createResource, equals, getChildCollection, getChildCollectionCount, getDelegate, getName, getParentCollection, getProperty, getResource, getResourceCount, getService, getServices, hashCode, isOpen, listChildCollections, listResources, removeResource, setDelegate, setProperty, storeResource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xmldb.api.base.Collection
createId, createResource, getChildCollection, getChildCollectionCount, getName, getParentCollection, getResource, getResourceCount, getService, getServices, isOpen, listChildCollections, listResources, removeResource, storeResource
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Constructor Detail

PoolableCollection

public PoolableCollection(org.xmldb.api.base.Collection col,
                          org.apache.commons.pool.KeyedObjectPool pool,
                          java.lang.String key)
Constuctor to create a poolable collection supplying references to the underlying collection, the pool checked out of and the pool key

Method Detail

close

public void close()
           throws org.xmldb.api.base.XMLDBException
Overriden to check back into the pool instead of closing the collection connection

Specified by:
close in interface org.xmldb.api.base.Collection
Overrides:
close in class DelegatingCollection
Throws:
org.xmldb.api.base.XMLDBException