org.enhydra.jdbc.core
Class CoreDataSource

java.lang.Object
  extended byorg.enhydra.jdbc.util.JdbcUtil
      extended byorg.enhydra.jdbc.core.CoreDataSource
All Implemented Interfaces:
javax.naming.spi.ObjectFactory, javax.naming.Referenceable, java.io.Serializable
Direct Known Subclasses:
StandardDataSource, StandardPoolDataSource

public class CoreDataSource
extends JdbcUtil
implements javax.naming.Referenceable, javax.naming.spi.ObjectFactory, java.io.Serializable

Provides a Data Source which can be used to generate JDBC connections.

This class is generic in the sense that it does not rely upon anything other than standard Java APIs. It uses java.sql.DriverManager and preconfigured properties to construct a JDBC connection.

See Also:
Serialized Form

Field Summary
 java.io.PrintWriter logWriter
           
 java.lang.String password
           
 java.lang.String user
           
 
Fields inherited from class org.enhydra.jdbc.util.JdbcUtil
log
 
Constructor Summary
CoreDataSource()
          Constructor
 
Method Summary
 java.lang.String getDescription()
          Setter/Getter defined for standard properties
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 java.lang.Object getObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env)
          Methods inherited from ObjectFactory
 java.lang.String getPassword()
           
 javax.naming.Reference getReference()
          Methods inherited from referenceable
 JdbcThreadFactory getThreadFactory()
           
 java.lang.String getUser()
           
 boolean isDebug()
           
 boolean isVerbose()
           
 void setDebug(boolean debug)
           
 void setDescription(java.lang.String description)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(java.io.PrintWriter out)
           
 void setPassword(java.lang.String password)
           
 void setThreadFactory(JdbcThreadFactory f)
           
 void setUser(java.lang.String user)
           
 void setVerbose(boolean verbose)
           
 void shutdown(boolean force)
          shutdown is a placeholder for datasources which should shut down any pools which they maintain.
 java.lang.String toString()
           
 
Methods inherited from class org.enhydra.jdbc.util.JdbcUtil
setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logWriter

public transient java.io.PrintWriter logWriter

user

public java.lang.String user

password

public java.lang.String password
Constructor Detail

CoreDataSource

public CoreDataSource()
Constructor

Method Detail

getDescription

public java.lang.String getDescription()
Setter/Getter defined for standard properties


getPassword

public java.lang.String getPassword()

getUser

public java.lang.String getUser()

getThreadFactory

public JdbcThreadFactory getThreadFactory()

isDebug

public boolean isDebug()

isVerbose

public boolean isVerbose()

setDescription

public void setDescription(java.lang.String description)

setPassword

public void setPassword(java.lang.String password)

setUser

public void setUser(java.lang.String user)

setDebug

public void setDebug(boolean debug)

setVerbose

public void setVerbose(boolean verbose)

setThreadFactory

public void setThreadFactory(JdbcThreadFactory f)

getLogWriter

public java.io.PrintWriter getLogWriter()

setLogWriter

public void setLogWriter(java.io.PrintWriter out)

shutdown

public void shutdown(boolean force)
shutdown is a placeholder for datasources which should shut down any pools which they maintain.


setLoginTimeout

public void setLoginTimeout(int seconds)

getLoginTimeout

public int getLoginTimeout()

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Methods inherited from referenceable

Specified by:
getReference in interface javax.naming.Referenceable
Throws:
javax.naming.NamingException

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object refObj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable env)
                                   throws java.lang.Exception
Methods inherited from ObjectFactory

Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Throws:
java.lang.Exception

toString

public java.lang.String toString()