|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xindice.util.SimpleConfigurable | +--org.apache.xindice.server.SimpleScriptComponent | +--org.apache.xindice.server.components.DBConduit
DBConduit provides a JDBC Connection pooling mechanism. It also allows driver and connection information to be accessed via centrally managed friendly alias names instead of hardcoded JDBC URLs.
Fields inherited from class org.apache.xindice.server.SimpleScriptComponent |
NAME, PACKAGE |
Constructor Summary | |
DBConduit()
|
Method Summary | |
DBQueryResult |
executeQuery(java.lang.String alias,
java.lang.String sql)
executeQuery |
int |
getAvailableConnections(java.lang.String alias)
getAvailableConnections returns the number of open Connections available in the connection queue. |
java.sql.Connection |
getConnection(java.lang.String alias)
getConnection returns the next available Connection from the connection queue or creates one if necessary. |
int |
getCreatedConnections(java.lang.String alias)
getCreatedConnections returns the number of open connections for the specified alias. |
java.lang.String |
getDescription(java.lang.String alias)
getDescription returns a description for the specified alias. |
java.lang.String |
getDriver(java.lang.String alias)
getDriver returns the driver class name for the specified alias. |
int |
getMaximumConnections(java.lang.String alias)
getMaximumConnections returns the maximum allowable number of open connections for the specified alias. |
java.lang.String |
getPingStatement(java.lang.String alias)
getPingStatement returns the SQL ping statement for the specified alias. |
int |
getTotalCreatedConnections(java.lang.String alias)
getTotalCreatedConnections returns the total number of connections that have been opened during the lifetime of the DBConduit. |
java.lang.String[] |
listAliases()
listAliases retrieves a list of the aliases available to the DBConduit |
void |
putConnection(java.lang.String alias,
java.sql.Connection connection)
putConnection returns a Connection to the connection queue. |
void |
removeConnection(java.lang.String alias,
java.sql.Connection connection)
removeConnection closes a connection and relieves the connection queue of the task of maintaining it. |
void |
setConfig(Configuration config)
setConfig sets the configuration information for the Configurable object instance. |
Methods inherited from class org.apache.xindice.server.SimpleScriptComponent |
dispose, getName, getPackageName, getVersion, setKernel |
Methods inherited from class org.apache.xindice.util.SimpleConfigurable |
getConfig |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBConduit()
Method Detail |
public void setConfig(Configuration config) throws XindiceException
Configurable
setConfig
in class SimpleConfigurable
org.apache.xindice.util.Configurable
config
- The configuration Nodepublic java.lang.String[] listAliases()
public java.lang.String getDescription(java.lang.String alias)
alias
- The alias namepublic java.lang.String getDriver(java.lang.String alias)
alias
- The alias namepublic java.lang.String getPingStatement(java.lang.String alias)
alias
- The alias namepublic int getMaximumConnections(java.lang.String alias)
alias
- The alias namepublic int getCreatedConnections(java.lang.String alias)
alias
- The alias namepublic int getTotalCreatedConnections(java.lang.String alias)
alias
- The alias namepublic int getAvailableConnections(java.lang.String alias)
alias
- The alias namepublic java.sql.Connection getConnection(java.lang.String alias) throws java.sql.SQLException
alias
- The alias namepublic void putConnection(java.lang.String alias, java.sql.Connection connection)
alias
- The alias nameconnection
- A JDBC connectionpublic void removeConnection(java.lang.String alias, java.sql.Connection connection)
alias
- The alias nameconnection
- A JDBC connectionpublic DBQueryResult executeQuery(java.lang.String alias, java.lang.String sql) throws java.sql.SQLException
alias
- The alias namesql
- The SQL to execute
|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |