| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objecttoolbox.pooling.ResourcePoolImpl
toolbox.pooling.JDBCResourcePool
public class JDBCResourcePool
ResourcePool implementation to do JDBC connection pooling.
| Field Summary | 
|---|
| Fields inherited from class toolbox.pooling.ResourcePoolImpl | 
|---|
m_customProps | 
| Constructor Summary | |
|---|---|
JDBCResourcePool()
Default constructor  | 
|
| Method Summary | |
|---|---|
protected  java.lang.Object | 
createResource(XMLProperties xmlProps,
               int count)
Creates a JDBCConfig instance from the given XMLProperties and retrieves the Connection instance from the config instance.  | 
protected  void | 
destroyResource(java.lang.Object resource)
Destroys the given Connection.  | 
protected  boolean | 
isResourceValid(java.lang.Object resource)
Validates the given connection and returns the validation state.  | 
protected  void | 
preInit(XMLProperties xmlProps)
Not implemented.  | 
| Methods inherited from class toolbox.pooling.ResourcePoolImpl | 
|---|
destroy, getName, getResource, getStatus, getStatusString, init, releaseResource | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public JDBCResourcePool()
| Method Detail | 
|---|
protected void preInit(XMLProperties xmlProps)
                throws ResourcePoolException
preInit in class ResourcePoolImplxmlProps - XML configuration properties.
ResourcePoolException - if the custom initialisation fails.
protected java.lang.Object createResource(XMLProperties xmlProps,
                                          int count)
                                   throws ResourcePoolException
createResource in class ResourcePoolImplxmlProps - XML configuration properties.count - int indicating how many times this method has be called.
ResourcePoolException - if the JDBC connection cannot be created.
protected void destroyResource(java.lang.Object resource)
                        throws ResourcePoolException
destroyResource in class ResourcePoolImplresource - Connection resource to destroy.
ResourcePoolException - if the connection could not be closed.
protected boolean isResourceValid(java.lang.Object resource)
                           throws ResourcePoolException
isResourceValid in class ResourcePoolImplresource - Data connection to validate.
ResourcePoolException
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||