|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.lakesidetech.springxmldb.connectionpool.PoolableCollectionFactory
The PoolableCollectionFactory
creates instances of the PoolableCollection
Constructor Summary | |
PoolableCollectionFactory()
Default Constructor |
|
PoolableCollectionFactory(java.lang.String databaseImpl,
java.lang.String databaseURI)
Constructor given only the database URI and the driver classname |
|
PoolableCollectionFactory(java.lang.String databaseImpl,
java.lang.String databaseURI,
java.lang.String username,
java.lang.String password)
Constructor given the database URI, driver classname, and user connection details |
Method Summary | |
void |
activateObject(java.lang.Object key,
java.lang.Object obj)
activate object when returning from the pool |
void |
destroyObject(java.lang.Object key,
java.lang.Object obj)
destroy an existing object from the pool. |
java.lang.String |
getDatabaseImpl()
|
java.lang.String |
getDatabaseInstanceURI()
|
java.lang.String |
getPassword()
|
org.apache.commons.pool.KeyedObjectPool |
getPool()
|
java.lang.String |
getUsername()
|
java.lang.Object |
makeObject(java.lang.Object key)
make the collection object to be returned from the pool |
void |
passivateObject(java.lang.Object key,
java.lang.Object obj)
passivate the object when returning to the pool |
void |
registerDriver()
register the XML:DB class driver. |
void |
setDatabaseImpl(java.lang.String string)
|
void |
setDatabaseInstanceURI(java.lang.String string)
|
void |
setPassword(java.lang.String string)
|
void |
setPool(org.apache.commons.pool.KeyedObjectPool pool)
|
void |
setUsername(java.lang.String string)
|
boolean |
validateObject(java.lang.Object key,
java.lang.Object obj)
Validate the object is still ok to be returned by the pool |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PoolableCollectionFactory()
public PoolableCollectionFactory(java.lang.String databaseImpl, java.lang.String databaseURI)
public PoolableCollectionFactory(java.lang.String databaseImpl, java.lang.String databaseURI, java.lang.String username, java.lang.String password)
Method Detail |
public org.apache.commons.pool.KeyedObjectPool getPool()
public void setPool(org.apache.commons.pool.KeyedObjectPool pool)
pool
- The pool to set.public void registerDriver() throws java.lang.Exception
java.lang.Exception
- if anything goes wrongpublic java.lang.Object makeObject(java.lang.Object key) throws java.lang.Exception
makeObject
in interface org.apache.commons.pool.KeyedPoolableObjectFactory
key
- the collection path to connect to
java.lang.Exception
- if anything goes wrong (is defined by org.apache.commons.pool.KeyedPoolableObjectFactory)
XMLDBException will be thrown if the uri/collection can not be foundKeyedPoolableObjectFactory.makeObject(java.lang.Object)
public void destroyObject(java.lang.Object key, java.lang.Object obj) throws java.lang.Exception
destroyObject
in interface org.apache.commons.pool.KeyedPoolableObjectFactory
key
- The key which should be the collection pathobj
- The object created which should be a PoolableCollection
java.lang.Exception
KeyedPoolableObjectFactory.destroyObject(java.lang.Object, java.lang.Object)
public boolean validateObject(java.lang.Object key, java.lang.Object obj)
validateObject
in interface org.apache.commons.pool.KeyedPoolableObjectFactory
key
- the pool key, in this case the collection pathobj
- The object created which should be a PoolableCollection
KeyedPoolableObjectFactory.validateObject(java.lang.Object, java.lang.Object)
public void activateObject(java.lang.Object key, java.lang.Object obj) throws java.lang.Exception
activateObject
in interface org.apache.commons.pool.KeyedPoolableObjectFactory
key
- obj
-
java.lang.Exception
KeyedPoolableObjectFactory.activateObject(java.lang.Object, java.lang.Object)
public void passivateObject(java.lang.Object key, java.lang.Object obj) throws java.lang.Exception
passivateObject
in interface org.apache.commons.pool.KeyedPoolableObjectFactory
key
- obj
-
java.lang.Exception
KeyedPoolableObjectFactory.passivateObject(java.lang.Object, java.lang.Object)
public java.lang.String getDatabaseImpl()
public java.lang.String getDatabaseInstanceURI()
public void setDatabaseImpl(java.lang.String string)
string
- public void setDatabaseInstanceURI(java.lang.String string)
string
- public java.lang.String getPassword()
public java.lang.String getUsername()
public void setPassword(java.lang.String string)
string
- public void setUsername(java.lang.String string)
string
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |