org.jboss.resource.adapter.jdbc
Class WrapperDataSource

java.lang.Object
  extended byorg.jboss.resource.adapter.jdbc.WrapperDataSource
All Implemented Interfaces:
DataSource (src) , javax.naming.Referenceable, Referenceable (src) , java.io.Serializable

public class WrapperDataSource
extends java.lang.Object
implements Referenceable (src) , DataSource (src) , java.io.Serializable

WrapperDataSource.java Created: Fri Apr 19 13:34:35 2002

See Also:
Serialized Form

Constructor Summary
WrapperDataSource(BaseWrapperManagedConnectionFactory (src)  mcf, ConnectionManager (src)  cm)
           
 
Method Summary
 java.sql.Connection getConnection()
          Attempt to establish a database connection.
 java.sql.Connection getConnection(java.lang.String user, java.lang.String password)
          Attempt to establish a database connection.
 int getLoginTimeout()
          Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.
 java.io.PrintWriter getLogWriter()
          Get the log writer for this data source.
 javax.naming.Reference getReference()
           
 void setLoginTimeout(int param1)
          Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
 void setLogWriter(java.io.PrintWriter param1)
          Set the log writer for this data source.
 void setReference(javax.naming.Reference reference)
          Sets the reference instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrapperDataSource

public WrapperDataSource(BaseWrapperManagedConnectionFactory (src)  mcf,
                         ConnectionManager (src)  cm)
Method Detail

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws java.sql.SQLException
Description copied from interface: DataSource (src)

Get the log writer for this data source.

The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.

Specified by:
getLogWriter in interface DataSource (src)
Returns:
Throws:
java.sql.SQLException -

setLogWriter

public void setLogWriter(java.io.PrintWriter param1)
                  throws java.sql.SQLException
Description copied from interface: DataSource (src)

Set the log writer for this data source.

The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the java.sql.Drivermanager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.

Specified by:
setLogWriter in interface DataSource (src)
Parameters:
param1 -
Throws:
java.sql.SQLException -

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Description copied from interface: DataSource (src)
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise it means that there is no timeout. When a DataSource object is created the login timeout is initially zero.

Specified by:
getLoginTimeout in interface DataSource (src)
Returns:
Throws:
java.sql.SQLException -

setLoginTimeout

public void setLoginTimeout(int param1)
                     throws java.sql.SQLException
Description copied from interface: DataSource (src)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise it specifies that there is no timeout. When a DataSource object is created the login timeout is initially zero.

Specified by:
setLoginTimeout in interface DataSource (src)
Parameters:
param1 -
Throws:
java.sql.SQLException -

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Description copied from interface: DataSource (src)
Attempt to establish a database connection.

Specified by:
getConnection in interface DataSource (src)
Returns:
Throws:
java.sql.SQLException -

getConnection

public java.sql.Connection getConnection(java.lang.String user,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Description copied from interface: DataSource (src)
Attempt to establish a database connection.

Specified by:
getConnection in interface DataSource (src)
Parameters:
user - - the database user on whose behalf the Connection is being made
password - - the user's password
Returns:
Throws:
java.sql.SQLException -

setReference

public void setReference(javax.naming.Reference reference)
Description copied from interface: Referenceable (src)
Sets the reference instance

Specified by:
setReference in interface Referenceable (src)
Parameters:
reference - the reference

getReference

public javax.naming.Reference getReference()
Specified by:
getReference in interface javax.naming.Referenceable
Returns:
Throws:
javax.naming.NamingException -