com.javaranch.unittest.helper.sql.pool
Class SimpleDataSource

java.lang.Object
  |
  +--javax.naming.Reference
        |
        +--com.javaranch.unittest.helper.sql.pool.SimpleDataSource
All Implemented Interfaces:
java.lang.Cloneable, javax.sql.DataSource, java.io.Serializable

class SimpleDataSource
extends javax.naming.Reference
implements javax.sql.DataSource

Title: SimpleDataSource

Description: A very simple datasource. Creates a new Connection to the database everytime it's ask for one so....

Copyright: Copyright (c) 2002

- - - - - - - - - - - - - - - - -

You are welcome to do whatever you want to with this source file provided that you maintain this comment fragment (between the dashed lines). Modify it, change the package name, change the class name ... personal or business use ... sell it, share it ... add a copyright for the portions you add ...

My goal in giving this away and maintaining the copyright is to hopefully direct developers back to JavaRanch.

The original source can be found at JavaRanch

- - - - - - - - - - - - - - - - -

Company:

See Also:
Serialized Form

Field Summary
(package private)  java.lang.String dbDriver
           
(package private)  java.lang.String dbLogin
           
(package private)  java.lang.String dbPassword
           
(package private)  java.lang.String dbServer
           
 
Fields inherited from class javax.naming.Reference
addrs, classFactory, classFactoryLocation, className
 
Constructor Summary
(package private) SimpleDataSource()
           
 
Method Summary
 java.sql.Connection getConnection()
          Method getConnection creates Connection to the database.
 java.sql.Connection getConnection(java.lang.String parm1, java.lang.String parm2)
          Method getConnection
 int getLoginTimeout()
          Method getLoginTimeout not yet implemented.
 java.io.PrintWriter getLogWriter()
          Method getLogWriter not yet implemented.
 void setLoginTimeout(int parm1)
          Method setLoginTimeout not yet implemented.
 void setLogWriter(java.io.PrintWriter parm1)
          Method setLogWriter not yet implemented.
 
Methods inherited from class javax.naming.Reference
add, add, clear, clone, equals, get, get, getAll, getClassName, getFactoryClassLocation, getFactoryClassName, hashCode, remove, size, toString
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dbDriver

java.lang.String dbDriver

dbServer

java.lang.String dbServer

dbLogin

java.lang.String dbLogin

dbPassword

java.lang.String dbPassword
Constructor Detail

SimpleDataSource

SimpleDataSource()
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Method getConnection creates Connection to the database.
Specified by:
getConnection in interface javax.sql.DataSource
Returns:
New Connection each time.
Throws:
java.sql.SQLException -  

getConnection

public java.sql.Connection getConnection(java.lang.String parm1,
                                         java.lang.String parm2)
                                  throws java.sql.SQLException
Method getConnection
Specified by:
getConnection in interface javax.sql.DataSource
Parameters:
parm1 -  
parm2 -  
Returns:
 
Throws:
java.sql.SQLException -  

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws java.sql.SQLException
Method getLogWriter not yet implemented.
Specified by:
getLogWriter in interface javax.sql.DataSource
Returns:
 
Throws:
java.sql.SQLException -  

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Method getLoginTimeout not yet implemented.
Specified by:
getLoginTimeout in interface javax.sql.DataSource
Returns:
 
Throws:
java.sql.SQLException -  

setLogWriter

public void setLogWriter(java.io.PrintWriter parm1)
                  throws java.sql.SQLException
Method setLogWriter not yet implemented.
Specified by:
setLogWriter in interface javax.sql.DataSource
Parameters:
parm1 -  
Throws:
java.sql.SQLException -  

setLoginTimeout

public void setLoginTimeout(int parm1)
                     throws java.sql.SQLException
Method setLoginTimeout not yet implemented.
Specified by:
setLoginTimeout in interface javax.sql.DataSource
Parameters:
parm1 -  
Throws:
java.sql.SQLException -