org.mortbay.jetty.plus
Class DefaultDataSourceService

java.lang.Object
  extended byorg.mortbay.jetty.plus.AbstractService
      extended byorg.mortbay.jetty.plus.AbstractDataSourceService
          extended byorg.mortbay.jetty.plus.DefaultDataSourceService
All Implemented Interfaces:
LifeCycle, Service

public class DefaultDataSourceService
extends AbstractDataSourceService

DefaultDataSourceService An implementation of a DataSource Service using XAPool as the connection pooling implementation.

Author:
janb

Nested Class Summary
 
Nested classes inherited from class org.mortbay.jetty.plus.AbstractDataSourceService
AbstractDataSourceService.DataSourceMap, AbstractDataSourceService.DataSourceObjectFactory
 
Constructor Summary
DefaultDataSourceService()
           
 
Method Summary
 javax.sql.DataSource createPooledDataSource(java.lang.String jndiName, javax.sql.ConnectionPoolDataSource cpds)
          Configure a DataSource that is capable of pooling Connections.
 
Methods inherited from class org.mortbay.jetty.plus.AbstractDataSourceService
addConnectionPoolDataSource, addDataSource, getDataSource, start
 
Methods inherited from class org.mortbay.jetty.plus.AbstractService
getJNDI, getName, isStarted, setJNDI, setName, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDataSourceService

public DefaultDataSourceService()
Method Detail

createPooledDataSource

public javax.sql.DataSource createPooledDataSource(java.lang.String jndiName,
                                                   javax.sql.ConnectionPoolDataSource cpds)
                                            throws java.lang.Exception
Configure a DataSource that is capable of pooling Connections. This is accomplished by use of the XAPool connection pooling manager. To set up the pool configuration, call methods on the StandardPoolDataSource return object.

Specified by:
createPooledDataSource in class AbstractDataSourceService
Parameters:
jndiName - name of DataSource that client will lookup in java:comp/env
cpds - connection pool factory implementation
Returns:
StandardPoolDataSource instance that will be registered in java:comp/env
Throws:
java.lang.Exception


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.