|
Teiid 8.3.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teiid.jdbc.WrapperImpl
org.teiid.jdbc.BaseDataSource
org.teiid.jdbc.TeiidDataSource
public class TeiidDataSource
The Teiid JDBC DataSource implementation class of DataSource and
XADataSource.
The DataSource interface follows the JavaBean design pattern,
meaning the implementation class has properties that are accessed with getter methods
and set using setter methods, and where the getter and setter methods follow the JavaBean
naming convention (e.g., getPropertyName() : PropertyType
and setPropertyName(PropertyType) : void).
XADataSource interface is almost identical to the DataSource
interface, but rather than returning Connection instances, there are methods that
return XAConnection instances that can be used with distributed transactions.
The following are the properties for this DataSource:
| Property Name | Type | Description | ||||||||
| portNumber | int | The port number where a Teiid Server is listening for requests. | ||||||||
| serverName | String | The hostname or IP address of the Teiid Server. | ||||||||
| Field Summary |
|---|
| Fields inherited from class org.teiid.jdbc.BaseDataSource |
|---|
APP_NAME, DEFAULT_APP_NAME, DEFAULT_FETCH_SIZE, DEFAULT_LOG_LEVEL, DEFAULT_PARTIAL_RESULTS_MODE, DEFAULT_RESULT_SET_CACHE_MODE, DEFAULT_TIMEOUT, JDBC, PASSWORD, TXN_WRAP_AUTO, TXN_WRAP_OFF, TXN_WRAP_ON, USER_NAME, VDB_NAME, VDB_VERSION, VERSION |
| Constructor Summary | |
|---|---|
TeiidDataSource()
|
|
| Method Summary | |
|---|---|
protected Properties |
buildProperties(String userName,
String password)
|
protected String |
buildServerURL()
|
protected JDBCURL |
buildURL()
|
String |
getAlternateServers()
Returns a string containing a comma delimited list of alternate server(s). |
String |
getAutoFailover()
|
Connection |
getConnection()
Attempt to establish a database connection. |
Connection |
getConnection(String userName,
String password)
Attempt to establish a database connection. |
String |
getDiscoveryStrategy()
|
boolean |
getEncryptRequests()
|
String |
getJaasName()
Application name from JAAS Login Config file |
String |
getKerberosServicePrincipleName()
Kerberos KDC service principle name |
Logger |
getParentLogger()
|
boolean |
getPassthroughAuthentication()
Same as "isPassthroughAuthentication". |
int |
getPortNumber()
Returns the port number. |
boolean |
getSecure()
Same as "isSecure". |
String |
getServerName()
Returns the name of the server. |
boolean |
isEncryptRequests()
|
boolean |
isPassthroughAuthentication()
When true, this connection uses the passed in security domain to do the authentication. |
boolean |
isSecure()
Returns a flag indicating whether to create a secure connection or not. |
static String |
reasonWhyInvalidPortNumber(int portNumber)
Return the reason why the supplied port number may be invalid, or null if it is considered valid. |
static String |
reasonWhyInvalidServerName(String serverName)
Return the reason why the supplied server name may be invalid, or null if it is considered valid. |
static String |
reasonWhyInvalidSocketsPerVM(String socketsPerVM)
The reason why "socketsPerVM" is invalid. |
static String |
reasonWhyInvalidStickyConnections(String stickyConnections)
The reason why "stickyConnections" is invalid. |
void |
setAlternateServers(String servers)
Sets a list of alternate server(s) that can be used for connection fail-over. |
void |
setAutoFailover(String autoFailover)
|
void |
setDiscoveryStrategy(String discoveryStrategy)
|
void |
setEncryptRequests(boolean encryptRequests)
|
void |
setJaasName(String jaasApplicationName)
Application name from JAAS Login Config file |
void |
setKerberosServicePrincipleName(String kerberosServerName)
Kerberos KDC service principle name |
void |
setPassthroughAuthentication(boolean passthroughAuthentication)
When set to true, the connection uses the passed in security domain to do the authentication. |
void |
setPortNumber(int portNumber)
Sets the portNumber. |
void |
setSecure(boolean secure)
Sets the secure flag to use mms: protocol instead of the default mm: protocol. |
void |
setServerName(String serverName)
Sets the serverName. |
String |
toString()
|
protected void |
validateProperties(String userName,
String password)
|
| Methods inherited from class org.teiid.jdbc.WrapperImpl |
|---|
isWrapperFor, unwrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Constructor Detail |
|---|
public TeiidDataSource()
| Method Detail |
|---|
protected Properties buildProperties(String userName, String password)
buildProperties in class BaseDataSourceprotected String buildServerURL() throws TeiidSQLException
TeiidSQLExceptionprotected JDBCURL buildURL() throws TeiidSQLException
TeiidSQLExceptionprotected void validateProperties(String userName, String password) throws SQLException
validateProperties in class BaseDataSourceSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourcegetConnection in class BaseDataSourceSQLException - if a database-access error occursDataSource.getConnection()public Connection getConnection(String userName, String password) throws SQLException
userName - the database user on whose behalf the Connection is being madepassword - the user's password
SQLException - if a database-access error occursDataSource.getConnection(java.lang.String, java.lang.String)public String toString()
Object.toString()public int getPortNumber()
public String getServerName()
public boolean isSecure()
public boolean getSecure()
public String getAlternateServers()
null is returned.
null If
no alternate servers are defined.public void setPortNumber(int portNumber)
portNumber - The portNumber to setpublic void setServerName(String serverName)
serverName - The serverName to setpublic void setSecure(boolean secure)
secure - True to use mms:public void setAlternateServers(String servers)
portNumber is used.
If servers is empty or null, the value of
alternateServers is cleared.
servers - A comma delimited list of alternate
Server(s):Port(s) to use for connection fail-over. If blank or
null, the list is cleared.public static String reasonWhyInvalidPortNumber(int portNumber)
portNumber - a possible value for the property
setPortNumber(int)public static String reasonWhyInvalidServerName(String serverName)
serverName - a possible value for the property
setServerName(String)public static String reasonWhyInvalidSocketsPerVM(String socketsPerVM)
value - of "socketsPerVM" property
public static String reasonWhyInvalidStickyConnections(String stickyConnections)
value - of "stickyConnections" property
public String getAutoFailover()
public void setAutoFailover(String autoFailover)
transparentFailover - The transparentFailover to set.public String getDiscoveryStrategy()
public void setDiscoveryStrategy(String discoveryStrategy)
public boolean isPassthroughAuthentication()
public boolean getPassthroughAuthentication()
public void setPassthroughAuthentication(boolean passthroughAuthentication)
public String getJaasName()
public void setJaasName(String jaasApplicationName)
public String getKerberosServicePrincipleName()
public void setKerberosServicePrincipleName(String kerberosServerName)
public Logger getParentLogger() throws SQLFeatureNotSupportedException
SQLFeatureNotSupportedExceptionpublic void setEncryptRequests(boolean encryptRequests)
public boolean isEncryptRequests()
public boolean getEncryptRequests()
|
Teiid 8.3.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||