|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.pbeans.data.GenericDataSource
public class GenericDataSource
An implementation of DataSource that can be used with any JDBC driver. The caller is required to set properties driverClassName and url.
| Constructor Summary | |
|---|---|
GenericDataSource()
|
|
GenericDataSource(java.lang.String driverClassName,
java.lang.String url)
|
|
| Method Summary | |
|---|---|
java.sql.Connection |
getConnection()
|
protected java.sql.Connection |
getConnection(java.util.Properties properties)
|
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
|
int |
getLoginTimeout()
|
java.io.PrintWriter |
getLogWriter()
|
void |
setDriverClassName(java.lang.String dcn)
Sets mandatory property driverClassName, the name of the JDBC Driver class (e.g. |
void |
setLoginTimeout(int seconds)
|
void |
setLogWriter(java.io.PrintWriter out)
|
void |
setProperties(java.util.Properties properties)
Sets properties passed to Driver.connect method. |
void |
setUrl(java.lang.String url)
Sets mandatory property url, the JDBC connection URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericDataSource()
public GenericDataSource(java.lang.String driverClassName,
java.lang.String url)
throws java.lang.IllegalAccessException
java.lang.IllegalAccessException| Method Detail |
|---|
public void setDriverClassName(java.lang.String dcn)
public void setUrl(java.lang.String url)
public void setProperties(java.util.Properties properties)
Driver.connect method.
Properties typically needed are user and
password,
if they are not passed as part of the URL.
protected java.sql.Connection getConnection(java.util.Properties properties)
throws java.sql.SQLException
java.sql.SQLException
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLException
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic int getLoginTimeout()
getLoginTimeout in interface javax.sql.DataSourcepublic java.io.PrintWriter getLogWriter()
getLogWriter in interface javax.sql.DataSourcepublic void setLoginTimeout(int seconds)
setLoginTimeout in interface javax.sql.DataSourcepublic void setLogWriter(java.io.PrintWriter out)
setLogWriter in interface javax.sql.DataSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||