|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.lakesidetech.springxmldb.datasource.PoolingXMLDBDataSource
An implementation of the XMLDBDataSource which uses pooling collections
Field Summary | |
protected java.io.PrintWriter |
logWriter
My log writer. |
protected org.apache.commons.pool.KeyedObjectPool |
pool
|
Constructor Summary | |
PoolingXMLDBDataSource()
default constructor |
|
PoolingXMLDBDataSource(org.apache.commons.pool.KeyedObjectPool pool)
Constructor with a configured pool |
Method Summary | |
org.xmldb.api.base.Collection |
getCollection()
Get an XML:DB collection for the default collection path. |
org.xmldb.api.base.Collection |
getCollection(java.lang.String collectionPath)
return a XML:DB collection object given the collection path. |
org.xmldb.api.base.Collection |
getCollection(java.lang.String username,
java.lang.String password,
java.lang.String collectionPath)
not supported for pooling collections |
java.lang.String |
getDefaultCollectionPath()
|
int |
getLoginTimeout()
Throws UnsupportedOperationException . |
java.io.PrintWriter |
getLogWriter()
Returns my log writer. |
boolean |
isAccessToUnderlyingCollectionAllowed()
Returns the value of the accessToUnderlyingConnectionAllowed property. |
void |
setAccessToUnderlyingCollectionAllowed(boolean allow)
Sets the value of the accessToUnderlyingConnectionAllowed property. |
void |
setDefaultCollectionPath(java.lang.String defaultCollectionPath)
|
void |
setLoginTimeout(int seconds)
Throws UnsupportedOperationException . |
void |
setLogWriter(java.io.PrintWriter out)
Sets my log writer. |
void |
setPool(org.apache.commons.pool.KeyedObjectPool pool)
Set the KeyedObjectPool used in this datasource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.PrintWriter logWriter
protected org.apache.commons.pool.KeyedObjectPool pool
Constructor Detail |
public PoolingXMLDBDataSource()
public PoolingXMLDBDataSource(org.apache.commons.pool.KeyedObjectPool pool)
pool
- commons KeyedObjectPoolMethod Detail |
public void setPool(org.apache.commons.pool.KeyedObjectPool pool) throws java.lang.IllegalStateException, java.lang.NullPointerException
pool
-
java.lang.IllegalStateException
java.lang.NullPointerException
public java.lang.String getDefaultCollectionPath()
public void setDefaultCollectionPath(java.lang.String defaultCollectionPath)
defaultCollectionPath
- The defaultCollectionPath to set.public boolean isAccessToUnderlyingCollectionAllowed()
public void setAccessToUnderlyingCollectionAllowed(boolean allow)
allow
- Access to the underlying connection is granted when true.public java.io.PrintWriter getLogWriter()
DataSource#getLogWriter
public int getLoginTimeout()
UnsupportedOperationException
.
java.lang.UnsupportedOperationException
- As this
implementation does not support this feature.public void setLoginTimeout(int seconds)
UnsupportedOperationException
.
java.lang.UnsupportedOperationException
- As this
implementation does not support this feature.public void setLogWriter(java.io.PrintWriter out)
public org.xmldb.api.base.Collection getCollection() throws org.xmldb.api.base.XMLDBException
getCollection
in interface XMLDBDataSource
org.xmldb.api.base.XMLDBException
- if collection cannot be foundXMLDBDataSource.getCollection()
public org.xmldb.api.base.Collection getCollection(java.lang.String collectionPath) throws org.xmldb.api.base.XMLDBException
getCollection
in interface XMLDBDataSource
collectionPath
-
org.xmldb.api.base.XMLDBException
- if the collection cannot be connectedXMLDBDataSource.getCollection(java.lang.String)
public org.xmldb.api.base.Collection getCollection(java.lang.String username, java.lang.String password, java.lang.String collectionPath) throws org.xmldb.api.base.XMLDBException
getCollection
in interface XMLDBDataSource
username
- the connection usernamepassword
- the connection passwordcollectionPath
- the collection path to return the collection
org.xmldb.api.base.XMLDBException
- if the collection cannot be connectedXMLDBDataSource.getCollection(java.lang.String, java.lang.String, java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |