org.mortbay.jetty.plus

Class DefaultDataSourceService

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/interfaces inherited from class org.mortbay.jetty.plus.AbstractDataSourceService

AbstractDataSourceService.DataSourceMap, AbstractDataSourceService.DataSourceObjectFactory

Field Summary

Fields inherited from class org.mortbay.jetty.plus.AbstractDataSourceService

dsMap

Fields inherited from class org.mortbay.jetty.plus.AbstractService

_jndi, _name, _started

Constructor Summary

DefaultDataSourceService()

Method Summary

DataSource
createPooledDataSource(String jndiName, ConnectionPoolDataSource cpds)
Configure a DataSource that is capable of pooling Connections.

Methods inherited from class org.mortbay.jetty.plus.AbstractDataSourceService

addConnectionPoolDataSource, addDataSource, createPooledDataSource, getDataSource, getDataSourceReference, start

Methods inherited from class org.mortbay.jetty.plus.AbstractService

getJNDI, getName, isStarted, setJNDI, setName, start, stop

Constructor Details

DefaultDataSourceService

public DefaultDataSourceService()

Method Details

createPooledDataSource

public DataSource createPooledDataSource(String jndiName,
                                         ConnectionPoolDataSource cpds)
            throws 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.
Overrides:
createPooledDataSource in interface 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

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