ca.idms.jdbc
Class IdmsDataSource

java.lang.Object
  extended by ca.idms.jdbc.IdmsCommonDataSource
      extended by ca.idms.jdbc.IdmsDataSource
All Implemented Interfaces:
IdmsDriverInterface, java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource

public class IdmsDataSource
extends IdmsCommonDataSource
implements javax.sql.DataSource

The CA IDMS JDBC DataSource implementation class. An IdmsDataSource object can be used to establish a connection to a CA IDMS database. It can be used in conjunction with, but does not require, a "data source" definition in the CA IDMS configuration file or Windows registry. Note that client trace and tuning options are specified in the configuration file or registry.

Author:
Dave Ross
See Also:
IdmsCommonDataSource, IdmsConnection

Field Summary
 
Fields inherited from class ca.idms.jdbc.IdmsCommonDataSource
CCI, IDMS, TCP
 
Fields inherited from interface ca.idms.jdbc.IdmsDriverInterface
ACCOUNT, BATCH, CCIHOST, CCIPORT, CSUSPEND, CUSTOM, DEF_CCIPORT, DEF_TASK, DEFSCHEM, EWAIT, INFO, INTERACTIVE, NODE, PASSWORD, PROGRAM, RSINT, SBUFLEN, SERVICE, SSL, STRACE, SUSPEND, TASK, USER, VIA
 
Constructor Summary
IdmsDataSource()
           
 
Method Summary
 java.sql.Connection getConnection()
          Connect using the default user id and password.
 java.sql.Connection getConnection(java.lang.String uid, java.lang.String pwd)
          Connect using the specified user id and password.
 boolean isWrapperFor(java.lang.Class<?> c)
          Returns true if this object either implements the class or interface argument.
<T> T
unwrap(java.lang.Class<T> c)
          Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by a proxy object.
 
Methods inherited from class ca.idms.jdbc.IdmsCommonDataSource
getAccountInfo, getConnectSuspend, getDatabaseName, getDataSourceName, getDefaultSchema, getDescription, getExternalWait, getIdmsConnection, getIdmsConnection, getLoginTimeout, getLogWriter, getNetworkProtocol, getNodeName, getPassword, getPortNumber, getProgramName, getResourceInterval, getRoleName, getServerLength, getServerName, getServerTrace, getSuspendStrategy, getTaskCode, getUser, getViaNodeName, isIdentityAudited, isSsl, list, list, setAccountInfo, setConnectSuspend, setDatabaseName, setDataSourceName, setDefaultSchema, setDescription, setExternalWait, setIdentityAudited, setLoginTimeout, setLogWriter, setNetworkProtocol, setNodeName, setPassword, setPortNumber, setProgramName, setResourceInterval, setRoleName, setServerLength, setServerName, setServerTrace, setSsl, setSuspendStrategy, setTaskCode, setUser, setViaNodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.CommonDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 

Constructor Detail

IdmsDataSource

public IdmsDataSource()
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Connect using the default user id and password.

Specified by:
getConnection in interface javax.sql.DataSource
Returns:
an IdmsConnection to the database
Throws:
java.sql.SQLException - if an error occurs.

getConnection

public java.sql.Connection getConnection(java.lang.String uid,
                                         java.lang.String pwd)
                                  throws java.sql.SQLException
Connect using the specified user id and password.

Specified by:
getConnection in interface javax.sql.DataSource
Parameters:
uid - the IDMS user id, can't be null, IDMS will complain
pwd - the IDMS password, can be null if IDMS not secured
Returns:
an IdmsConnection to the database
Throws:
java.sql.SQLException - if an error occurs.

isWrapperFor

public boolean isWrapperFor(java.lang.Class<?> c)
                     throws java.sql.SQLException
Returns true if this object either implements the class or interface argument.

Specified by:
isWrapperFor in interface java.sql.Wrapper
Parameters:
c - class or interface.
Returns:
true if this object that implements the interface or is an instance of the class.
Throws:
java.sql.SQLException
Since:
1.6

unwrap

public <T> T unwrap(java.lang.Class<T> c)
         throws java.sql.SQLException
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by a proxy object.

Specified by:
unwrap in interface java.sql.Wrapper
Parameters:
c - class or interface.
Returns:
Object that implements the interface or is an instance of the class.
Throws:
java.sql.SQLException - - If no object found.
Since:
1.6


Copyright © 2009 CA, All rights reserved