org.apache.turbine.services.db
Class TurbinePoolBrokerService
java.lang.Object
|
+--org.apache.turbine.services.BaseInitable
|
+--org.apache.turbine.services.BaseService
|
+--org.apache.turbine.services.db.TurbinePoolBrokerService
- All Implemented Interfaces:
- Initable, PoolBrokerService, Service
Deprecated. use org.apache.torque.Torque instead
- public class TurbinePoolBrokerService
- extends BaseService
- implements PoolBrokerService
Turbine's default implementation of PoolBrokerService
.
- Version:
- $Id: TurbinePoolBrokerService.java,v 1.8 2002/08/14 23:55:38 stephenh Exp $
- Author:
- Frank Y. Kim, Brett McLaughlin, Greg Ritter, Daniel Rall, Magnús Þór Torfason, Jason van Zyl, Rafal Krzewski
Method Summary |
java.sql.Connection |
getConnection()
Deprecated. This method returns a DBConnection from the default pool. |
java.sql.Connection |
getConnection(java.lang.String name)
Deprecated. This method returns a DBConnection from the pool with the
specified name. |
org.apache.torque.adapter.DB |
getDB()
Deprecated. Returns the database adapter for the default connection pool. |
org.apache.torque.adapter.DB |
getDB(java.lang.String name)
Deprecated. Returns database adapter for a specific connection pool. |
java.lang.String |
getDefaultDB()
Deprecated. Return the default pool. |
void |
init()
Deprecated. Initialize the connection pool broker. |
void |
releaseConnection(java.sql.Connection dbconn)
Deprecated. Release a connection back to the database pool. |
void |
shutdown()
Deprecated. Release the database connections for all pools on service shutdown. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TurbinePoolBrokerService
public TurbinePoolBrokerService()
- Deprecated.
init
public void init()
- Deprecated.
- Initialize the connection pool broker.
- Specified by:
init
in interface Initable
- Overrides:
init
in class BaseInitable
- Following copied from interface:
org.apache.turbine.services.Initable
- Throws:
InitializationException,
- if initialization of this
class was not successful.
getDefaultDB
public java.lang.String getDefaultDB()
- Deprecated.
- Return the default pool.
- Specified by:
getDefaultDB
in interface PoolBrokerService
shutdown
public void shutdown()
- Deprecated.
- Release the database connections for all pools on service shutdown.
- Specified by:
shutdown
in interface Initable
- Overrides:
shutdown
in class BaseInitable
getConnection
public java.sql.Connection getConnection()
throws java.lang.Exception
- Deprecated.
- This method returns a DBConnection from the default pool.
- Specified by:
getConnection
in interface PoolBrokerService
- Returns:
- The requested connection.
- Throws:
java.lang.Exception
- A generic exception.
getConnection
public java.sql.Connection getConnection(java.lang.String name)
throws java.lang.Exception
- Deprecated.
- This method returns a DBConnection from the pool with the
specified name.
- Specified by:
getConnection
in interface PoolBrokerService
- Parameters:
name
- The name of the pool to get a connection from.- Returns:
- The requested connection.
- Throws:
java.lang.Exception
- A generic exception.
releaseConnection
public void releaseConnection(java.sql.Connection dbconn)
throws java.lang.Exception
- Deprecated.
- Release a connection back to the database pool.
null
references are ignored.
- Specified by:
releaseConnection
in interface PoolBrokerService
- Throws:
java.lang.Exception
- A generic exception.
getDB
public org.apache.torque.adapter.DB getDB()
throws java.lang.Exception
- Deprecated.
- Returns the database adapter for the default connection pool.
- Specified by:
getDB
in interface PoolBrokerService
- Returns:
- The database adapter.
- Throws:
java.lang.Exception
- A generic exception.
getDB
public org.apache.torque.adapter.DB getDB(java.lang.String name)
throws java.lang.Exception
- Deprecated.
- Returns database adapter for a specific connection pool.
- Specified by:
getDB
in interface PoolBrokerService
- Parameters:
name
- A pool name.- Returns:
- The corresponding database adapter.
- Throws:
java.lang.Exception
- A generic exception.
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.