org.enhydra.jdbc.core
Class CoreDataSource
java.lang.Object
|
+--org.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 java.lang.Object
- 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logWriter
public transient java.io.PrintWriter logWriter
user
public java.lang.String user
password
public java.lang.String password
CoreDataSource
public CoreDataSource()
- Constructor
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.
log
public void log(java.lang.String msg)
- Outputs a log message to the log writer.
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
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