|
J2EE1.4 SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The javax.sql.DataSource
implementation of SunONE application
server will implement this interface. An application program would be able
to use this interface to do the extended functionality exposed by SunONE
application server.
A sample code for getting driver's connection implementation would like the following.
InitialContext ic = new InitialContext(); com.sun.appserv.DataSource ds = (com.sun.appserv.DataSOurce) ic.lookup("jdbc/PointBase"); Connection con = ds.getConnection(); Connection drivercon = ds.getConnection(con); // Do db operations. con.close();
Method Summary | |
java.sql.Connection |
getConnection(java.sql.Connection con)
Retrieves the actual SQLConnection from the Connection wrapper implementation of SunONE application server. |
java.sql.Connection |
getNonTxConnection()
Gets a connection that is not in the scope of any transaction. |
java.sql.Connection |
getNonTxConnection(java.lang.String userName,
java.lang.String password)
Gets a connection that is not in the scope of any transaction. |
Methods inherited from interface javax.sql.DataSource |
getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Method Detail |
public java.sql.Connection getConnection(java.sql.Connection con) throws java.sql.SQLException
con
- Connection obtained from Datasource.getConnection()
java.sql.Connection
implementation of the driver.
java.sql.SQLException
- If connection cannot be obtained.
java.sql.SQLException
public java.sql.Connection getNonTxConnection() throws java.sql.SQLException
java.sql.Connection
java.sql.SQLException
- If connection cannot be obtained
java.sql.SQLException
public java.sql.Connection getNonTxConnection(java.lang.String userName, java.lang.String password) throws java.sql.SQLException
password
- Password for authenticating the connection
java.sql.Connection
java.sql.SQLException
- If connection cannot be obtained
java.sql.SQLException
|
J2EE1.4 SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2003 Sun Microsystems, Inc. All rights reserved.