|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.logicalcobwebs.proxool.SimpoolAdapter
public class SimpoolAdapter
This is the simplest pool you can get. It isn�t thread safe. It isn't robust.
But it is fast. We use it as our bench mark on how could we should strive
to be.
Provides Simpool connections to the ScriptFacade
| Field Summary | |
|---|---|
private java.sql.Connection[] |
connections
|
private int |
index
|
private static Log |
LOG
|
| Constructor Summary | |
|---|---|
SimpoolAdapter()
|
|
| 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. |
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 |
getName()
Convenient name so we can identify this adapter in logs. |
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) |
| 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.sql.Connection[] connections
private int index
| Constructor Detail |
|---|
public SimpoolAdapter()
| Method Detail |
|---|
public java.lang.String getName()
ConnectionAdapterIF
getName in interface ConnectionAdapterIF
public void setup(java.lang.String driver,
java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
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
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 void closeConnection(java.sql.Connection connection)
ConnectionAdapterIF
closeConnection in interface ConnectionAdapterIFconnection - the connection to "close"public void tearDown()
ConnectionAdapterIF
tearDown in interface ConnectionAdapterIF
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||