public final class AuroraDataSource
extends java.lang.Object
implements javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable
| Constructor and Description |
|---|
AuroraDataSource()
Default no-arg constructor for Serialization.
|
| Modifier and Type | Method and Description |
|---|---|
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.lang.String userID,
java.lang.String pass) |
java.lang.String |
getDatabaseName()
Gets the name of the database.
|
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
java.util.logging.Logger |
getParentLogger() |
int |
getPort()
Returns the port number used for connecting to the database.
|
javax.naming.Reference |
getReference() |
java.lang.String |
getServerName()
Returns the name of the database server.
|
java.lang.String |
getURL()
Returns the JDBC URL that will be used to create the database connection.
|
java.lang.String |
getUsername()
Returns the configured username for this connection.
|
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setDatabaseName(java.lang.String dbName)
Sets the database name.
|
void |
setLoginTimeout(int timeout) |
void |
setLogWriter(java.io.PrintWriter output) |
void |
setPassword(java.lang.String pass)
Sets the password to be used for new connections.
|
void |
setPort(int port)
Sets the database port.
|
void |
setServerName(java.lang.String serverName)
Sets the server name.
|
void |
setURL(java.lang.String url)
This method is used by the app server to set the url string specified within the datasource
deployment descriptor.
|
void |
setUsername(java.lang.String username)
Sets the username to authenticate against the database with.
|
<T> T |
unwrap(java.lang.Class<T> iface) |
public AuroraDataSource()
public javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablejavax.naming.NamingExceptionpublic java.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException
getParentLogger in interface javax.sql.CommonDataSourcejava.sql.SQLFeatureNotSupportedExceptionpublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionpublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.sql.Connection getConnection(java.lang.String userID,
java.lang.String pass)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setLogWriter(java.io.PrintWriter output)
throws java.sql.SQLException
setLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setLoginTimeout(int timeout)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLExceptionpublic void setPassword(java.lang.String pass)
pass - the passwordpublic void setPort(int port)
port - the port to connect topublic int getPort()
public void setUsername(java.lang.String username)
username - the username to be paired with the password when connecting to databasepublic java.lang.String getUsername()
public void setDatabaseName(java.lang.String dbName)
dbName - the name of the databasepublic java.lang.String getDatabaseName()
public void setServerName(java.lang.String serverName)
serverName - the server namepublic java.lang.String getServerName()
public void setURL(java.lang.String url)
url - url to be used within driver.connectpublic java.lang.String getURL()
setURL(String) that exact value will be returned. Otherwise a default generated URL
will be provided from the other set fields.