com.atomikos.jdbc.nonxa
Class DriverManagerDataSource
java.lang.Object
com.atomikos.jdbc.nonxa.DriverManagerDataSource
- All Implemented Interfaces:
- Serializable, DataSource
public class DriverManagerDataSource
- extends Object
- implements DataSource, Serializable
Copyright © 2004 Atomikos. All rights reserved.
A DataSource implementation that uses the DriverManager to get connections.
Instances can be used to access JDBC drivers that don't offer a DataSource
implementation of their own. Note: to do transactions, you should wrap
instances in a NonXADataSourceImp object!
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DriverManagerDataSource
public DriverManagerDataSource()
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
- See Also:
DataSource.getConnection()
getConnection
public Connection getConnection(String user,
String pw)
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
- See Also:
DataSource.getConnection(java.lang.String,
java.lang.String)
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
- Specified by:
getLogWriter
in interface DataSource
- Throws:
SQLException
- See Also:
DataSource.getLogWriter()
setLogWriter
public void setLogWriter(PrintWriter arg0)
throws SQLException
- Specified by:
setLogWriter
in interface DataSource
- Throws:
SQLException
- See Also:
DataSource.setLogWriter(java.io.PrintWriter)
setLoginTimeout
public void setLoginTimeout(int secs)
throws SQLException
- Specified by:
setLoginTimeout
in interface DataSource
- Throws:
SQLException
- See Also:
DataSource.setLoginTimeout(int)
getLoginTimeout
public int getLoginTimeout()
throws SQLException
- Specified by:
getLoginTimeout
in interface DataSource
- Throws:
SQLException
- See Also:
DataSource.getLoginTimeout()
getUrl
public String getUrl()
getUser
public String getUser()
setPassword
public void setPassword(String string)
setUrl
public void setUrl(String string)
setUser
public void setUser(String string)
getDriverClassName
public String getDriverClassName()
setDriverClassName
public void setDriverClassName(String string)