|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.jetty.plus.AbstractService org.mortbay.jetty.plus.AbstractDataSourceService
AbstractDataSourceService Base class for DataSource Service implementations. This class provides support for plugging DataSources and DataSource Connection pooling implementations into JettyPlus. A DefaultDataSourceService subclass provides a Connection pooling implementation courtesy of XAPool project http://xapool.experlog.com. If you wish to incorporate a different connection pooling implementation, then subclass this class an implement the addDataSource(name, connectionpoolingdatasource) method.
Nested Class Summary | |
static interface |
AbstractDataSourceService.DataSourceMap
|
static class |
AbstractDataSourceService.DataSourceObjectFactory
DataSourceObjectFactory ObjectFactory for references to DataSources bound in JNDI. |
Constructor Summary | |
AbstractDataSourceService()
Constructor. |
Method Summary | |
javax.sql.DataSource |
addConnectionPoolDataSource(java.lang.String jndiName,
javax.sql.ConnectionPoolDataSource cpds)
Add a JDBC2/3 compliant source of poolable connections. |
void |
addDataSource(java.lang.String jndiName,
javax.sql.DataSource ds)
Add a DataSource implementation to JettyPlus. |
abstract javax.sql.DataSource |
createPooledDataSource(java.lang.String jndiName,
javax.sql.ConnectionPoolDataSource cpds)
Implement this method to create your pool implementation. |
javax.sql.DataSource |
getDataSource(java.lang.String jndiName)
Get a DataSource implementation from the list of registered DataSources. |
void |
start()
Start the Service. |
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 |
public AbstractDataSourceService()
Method Detail |
public javax.sql.DataSource addConnectionPoolDataSource(java.lang.String jndiName, javax.sql.ConnectionPoolDataSource cpds) throws java.lang.Exception
jndiName
- cpds
-
java.lang.Exception
public abstract javax.sql.DataSource createPooledDataSource(java.lang.String jndiName, javax.sql.ConnectionPoolDataSource cpds) throws java.lang.Exception
jndiName
- cpds
-
java.lang.Exception
public void addDataSource(java.lang.String jndiName, javax.sql.DataSource ds) throws java.lang.Exception
jndiName
- then name the client uses to lookup the DataSource relative to java:comp/envds
- the javax.sql.DataSource implementation
java.lang.Exception
public javax.sql.DataSource getDataSource(java.lang.String jndiName)
jndiName
- the name of the DataSource from addDataSource()
public void start() throws java.lang.Exception
start
in interface Service
start
in class AbstractService
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |