|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.logicalcobwebs.proxool.ProxoolAdapter
public class ProxoolAdapter
Provides Proxool connections to the ScriptFacade
| Field Summary | |
|---|---|
private java.lang.String |
alias
|
private java.util.Properties |
changedInfo
|
private java.util.Properties |
completeInfo
|
private java.lang.String |
fullUrl
|
private static Log |
LOG
|
| Constructor Summary | |
|---|---|
ProxoolAdapter()
Default constructor. |
|
ProxoolAdapter(java.lang.String alias)
Use this constructor if you want to define the alias |
|
| Method Summary | |
|---|---|
void |
closeConnection(java.sql.Connection connection)
This gives the adapter the flexibilty of closing the connection for real or just putting it back in a pool. |
void |
definitionUpdated(ConnectionPoolDefinitionIF connectionPoolDefinition,
java.util.Properties completeInfo,
java.util.Properties changedInfo)
Gets called once after a pool has been updated. |
java.util.Properties |
getChangedInfo()
|
java.util.Properties |
getCompleteInfo()
|
java.sql.Connection |
getConnection()
Simply get a connection (using the definitions defined in ConnectionAdapterIF.setup(java.lang.String, java.lang.String, java.util.Properties) |
java.lang.String |
getFullUrl()
|
java.lang.String |
getName()
Convenient name so we can identify this adapter in logs. |
void |
setChangedInfo(java.util.Properties changedInfo)
|
void |
setCompleteInfo(java.util.Properties completeInfo)
|
void |
setup(java.lang.String driver,
java.lang.String url,
java.util.Properties info)
Setup the adapter. |
void |
tearDown()
Reclaim resources used by the adapter (for instance, close any open connections) |
void |
update(java.util.Properties info)
|
void |
update(java.lang.String url)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final Log LOG
private java.lang.String alias
private java.lang.String fullUrl
private java.util.Properties changedInfo
private java.util.Properties completeInfo
| Constructor Detail |
|---|
public ProxoolAdapter(java.lang.String alias)
alias - the alias of the poolpublic ProxoolAdapter()
| Method Detail |
|---|
public void definitionUpdated(ConnectionPoolDefinitionIF connectionPoolDefinition,
java.util.Properties completeInfo,
java.util.Properties changedInfo)
ConfigurationListenerIF
definitionUpdated in interface ConfigurationListenerIFconnectionPoolDefinition - the new definitioncompleteInfo - the properties that could be used to create this definitionchangedInfo - only the properties that have changed since the pool was
registered, or this method was las called.public java.util.Properties getChangedInfo()
public void setChangedInfo(java.util.Properties changedInfo)
public java.util.Properties getCompleteInfo()
public void setCompleteInfo(java.util.Properties completeInfo)
public java.lang.String getName()
ConnectionAdapterIF
getName in interface ConnectionAdapterIF
public void update(java.util.Properties info)
throws java.sql.SQLException,
ProxoolException
java.sql.SQLException
ProxoolException
public void update(java.lang.String url)
throws java.sql.SQLException,
ProxoolException
java.sql.SQLException
ProxoolException
public void setup(java.lang.String driver,
java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException,
ProxoolException
ConnectionAdapterIF
setup in interface ConnectionAdapterIFdriver - the name of the classurl - the url to pass to the driverinfo - the properties to pass to the driver
java.sql.SQLException - if anything goes wrong
ProxoolException
public java.sql.Connection getConnection()
throws java.sql.SQLException
ConnectionAdapterIFConnectionAdapterIF.setup(java.lang.String, java.lang.String, java.util.Properties)
getConnection in interface ConnectionAdapterIFjava.sql.SQLException - if anything goes wrongpublic java.lang.String getFullUrl()
public void closeConnection(java.sql.Connection connection)
throws java.sql.SQLException
ConnectionAdapterIF
closeConnection in interface ConnectionAdapterIFconnection - the connection to "close"
java.sql.SQLException - if anything goes wrongpublic void tearDown()
ConnectionAdapterIF
tearDown in interface ConnectionAdapterIF
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||