org.nanocontainer.persistence.jdbc
Class JNDIDataSource

java.lang.Object
  extended by org.nanocontainer.persistence.jdbc.AbstractDataSource
      extended by org.nanocontainer.persistence.jdbc.JNDIDataSource
All Implemented Interfaces:
DataSource, org.picocontainer.Startable

public class JNDIDataSource
extends AbstractDataSource
implements org.picocontainer.Startable

Author:
Juze Peleteiro

Constructor Summary
JNDIDataSource(String name)
           
JNDIDataSource(String name, Context context)
           
JNDIDataSource(String name, Context context, ExceptionHandler jdbcExceptionHandler)
           
JNDIDataSource(String name, ExceptionHandler jdbcExceptionHandler)
           
 
Method Summary
protected  DataSource getDelegatedDataSource()
           
protected  void invalidateDelegatedDataSource()
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.nanocontainer.persistence.jdbc.AbstractDataSource
getConnection, getConnection, getLoginTimeout, getLogWriter, handleException, setLoginTimeout, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDIDataSource

public JNDIDataSource(String name)
Parameters:
name - JNDI name where the original DataSource is.
jdbcExceptionHandler - The ExceptionHandler component instance.

JNDIDataSource

public JNDIDataSource(String name,
                      ExceptionHandler jdbcExceptionHandler)
Parameters:
name - JNDI name where the original DataSource is.
jdbcExceptionHandler - The ExceptionHandler component instance.

JNDIDataSource

public JNDIDataSource(String name,
                      Context context)
Parameters:
name - JNDI name where the original DataSource is.
context - JNDI context.

JNDIDataSource

public JNDIDataSource(String name,
                      Context context,
                      ExceptionHandler jdbcExceptionHandler)
Parameters:
name - JNDI name where the original DataSource is.
context - JNDI context.
jdbcExceptionHandler - The ExceptionHandler component instance.
Method Detail

getDelegatedDataSource

protected DataSource getDelegatedDataSource()
                                     throws Exception
Specified by:
getDelegatedDataSource in class AbstractDataSource
Throws:
Exception
See Also:
AbstractDataSource.getDelegatedDataSource()

invalidateDelegatedDataSource

protected void invalidateDelegatedDataSource()
                                      throws Exception
Specified by:
invalidateDelegatedDataSource in class AbstractDataSource
Throws:
Exception
See Also:
AbstractDataSource.invalidateDelegatedDataSource()

start

public void start()
Specified by:
start in interface org.picocontainer.Startable
See Also:
Startable.start()

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable
See Also:
Startable.stop()


Copyright 2003-2003-2006 Codehaus. All Rights Reserved.