public class JDBCDataSource extends JDBCCommonDataSource implements javax.sql.DataSource, java.io.Serializable, javax.naming.Referenceable, Wrapper
Title: Dataspace Framework
Description: Dataspace underlying provider implementation
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Constructor and Description |
---|
JDBCDataSource() |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Retrieves a new connection using the properties that have already been
set.
|
Connection |
getConnection(java.lang.String username,
java.lang.String password)
Retrieves a new connection using the given username and password,
and the database url that has been set.
|
javax.naming.Reference |
getReference()
Retrieves the Reference of this object.
|
boolean |
isWrapperFor(java.lang.Class iface)
Returns true if this either implements the interface argument or is directly or indirectly a wrapper
for an object that does.
|
java.lang.Object |
unwrap(java.lang.Class iface)
Returns an object that implements the given interface to allow access to
non-standard methods, or standard methods not exposed by the proxy.
|
getDatabase, getDatabaseName, getDataSourceName, getDescription, getLoginTimeout, getLogWriter, getNetworkProtocol, getParentLogger, getServerName, getUrl, getUser, setDatabase, setDatabaseName, setDataSourceName, setDescription, setLoginTimeout, setLogWriter, setNetworkProtocol, setPassword, setProperties, setServerName, setUrl, setUser
public Connection getConnection() throws SQLException
getConnection
in interface javax.sql.DataSource
SQLException
- if a database access error occurspublic Connection getConnection(java.lang.String username, java.lang.String password) throws SQLException
getConnection
in interface javax.sql.DataSource
username
- the database user on whose behalf the connection is
being madepassword
- the user's passwordSQLException
- if a database access error occurspublic java.lang.Object unwrap(java.lang.Class iface) throws SQLException
unwrap
recursively on the wrapped object
or a proxy for that result. If the receiver is not a
wrapper and does not implement the interface, then an SQLException
is thrown.unwrap
in interface Wrapper
iface
- A Class defining an interface that the result must implement.SQLException
- If no object found that implements the interfacepublic boolean isWrapperFor(java.lang.Class iface) throws SQLException
isWrapperFor
on the wrapped
object. If this does not implement the interface and is not a wrapper, return false.
This method should be implemented as a low-cost operation compared to unwrap
so that
callers can use this method to avoid expensive unwrap
calls that may fail. If this method
returns true then calling unwrap
with the same argument should succeed.isWrapperFor
in interface Wrapper
iface
- a Class defining an interface.SQLException
- if an error occurs while determining whether this is a wrapper
for an object with the given interface.public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
- If a naming exception was encountered
while retrieving the reference.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.