|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.idms.jdbc.IdmsCommonDataSource
public class IdmsCommonDataSource
This class is the base class for all CA IDMS DataSource implementations classes, and contains the properties for need to establish a connection.
Field Summary | |
---|---|
static java.lang.String |
CCI
networkProtocol value for type 2 driver |
static java.lang.String |
IDMS
networkProtocol value for type 4 driver |
static java.lang.String |
TCP
networkProtocol value for type 3 and 4 driver |
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 | |
---|---|
IdmsCommonDataSource()
|
Method Summary | |
---|---|
java.lang.String |
getAccountInfo()
Gets the accountCode property for this data source. |
boolean |
getConnectSuspend()
Deprecated. Use #getSuspendStrategy instead. |
java.lang.String |
getDatabaseName()
Gets the databaseName property for this data source. |
java.lang.String |
getDataSourceName()
Gets the dataSourceName property for this data source. |
java.lang.String |
getDefaultSchema()
Gets the defaultSchema property for this data source. |
java.lang.String |
getDescription()
Gets the description property for this data source. |
short |
getExternalWait()
Gets the externalWait property for this data source. |
IdmsConnection |
getIdmsConnection()
Connect using the default user id and password. |
IdmsConnection |
getIdmsConnection(java.lang.String uid,
java.lang.String pwd)
Connect using the specified user id and password. |
int |
getLoginTimeout()
Gets the replay timeout. |
java.io.PrintWriter |
getLogWriter()
Gets the log writer for this data source. |
java.lang.String |
getNetworkProtocol()
Gets the networkProtocol property for this data source. |
java.lang.String |
getNodeName()
Gets the nodeName property for this data source. |
java.lang.String |
getPassword()
Does not get the password For security. |
int |
getPortNumber()
Gets the portNumber property for this data source. |
java.lang.String |
getProgramName()
Gets the programName property for this data source. |
short |
getResourceInterval()
Gets the resourceInterval property for this data source. |
java.lang.String |
getRoleName()
Gets the roleName property for this data source. |
int |
getServerLength()
Gets the serverLength property for this data source. |
java.lang.String |
getServerName()
Gets the serverName property for this data source. |
int |
getServerTrace()
Gets the serverTrace property for this data source. |
java.lang.String |
getSuspendStrategy()
Gets the suspendStrategy for this data source. |
java.lang.String |
getTaskCode()
Gets the taskCode property for this data source. |
java.lang.String |
getUser()
Gets the user property for this data source. |
java.lang.String |
getViaNodeName()
Gets the viaNodeName property for this data source. |
boolean |
isIdentityAudited()
Is identity auditing enabled? |
boolean |
isSsl()
|
void |
list(java.io.PrintWriter out)
Lists the data source properties. |
void |
list(TraceOutput out)
Lists the data source properties. |
void |
setAccountInfo(java.lang.String s)
Sets the accountInfo property for this data source. |
void |
setConnectSuspend(boolean b)
Deprecated. Use #setSuspendStrategy With SERVICE instead. |
void |
setDatabaseName(java.lang.String s)
Sets the databaseName property for this data source. |
void |
setDataSourceName(java.lang.String dsn)
Sets the dataSourceName property for this data source. |
void |
setDefaultSchema(java.lang.String s)
Sets the defaultSchema property for this data source. |
void |
setDescription(java.lang.String s)
Sets the description property for this data source. |
void |
setExternalWait(short w)
Sets the externalWait property for this data source. |
void |
setIdentityAudited(boolean enable)
Enables or disables identity auditing. |
void |
setLoginTimeout(int t)
Sets the reply timeout. |
void |
setLogWriter(java.io.PrintWriter out)
Sets the log writer for this data source. |
void |
setNetworkProtocol(java.lang.String s)
Sets the networkProtocol property for this data source. |
void |
setNodeName(java.lang.String s)
Sets the nodeName property for this data source. |
void |
setPassword(java.lang.String pwd)
Sets the password property for this data source. |
void |
setPortNumber(int p)
Sets the portNumber property for this data source. |
void |
setProgramName(java.lang.String s)
Sets the programName property for this data source. |
void |
setResourceInterval(short w)
Sets the resourceInterval property for this data source. |
void |
setRoleName(java.lang.String s)
Sets the roleName property for this data source. |
void |
setServerLength(int l)
Sets the serverLength property for this data source. |
void |
setServerName(java.lang.String s)
Sets the serverName property for this data source. |
void |
setServerTrace(int t)
Sets the serverTrace property for this data source. |
void |
setSsl(boolean ssl)
Request an SSL connection. |
void |
setSuspendStrategy(java.lang.String s)
Sets the suspendStrategy property for this data source. |
void |
setTaskCode(java.lang.String s)
Sets the taskCode property for this data source. |
void |
setUser(java.lang.String uid)
Sets the user property for this data source. |
void |
setViaNodeName(java.lang.String s)
Sets the viaNodeName property for this data source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CCI
public static final java.lang.String TCP
public static final java.lang.String IDMS
Constructor Detail |
---|
public IdmsCommonDataSource()
Method Detail |
---|
public void setLoginTimeout(int t) throws java.sql.SQLException
IdmsConnectOptions.LOGIN_TIMEOUT
property.
setLoginTimeout
in interface javax.sql.CommonDataSource
t
- timeout in seconds, ignored if < 0
java.sql.SQLException
- not reallysetLoginTimeout(int)
,
IdmsStatement.setQueryTimeout(int)
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
- not reallygetLoginTimeout()
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
setLogWriter
in interface javax.sql.CommonDataSource
out
- the output print writer object
java.sql.SQLException
- not reallypublic java.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
- not reallypublic void setDataSourceName(java.lang.String dsn)
dsn
- the data source namepublic java.lang.String getDataSourceName()
setDataSourceName(java.lang.String)
public void setDescription(java.lang.String s)
s
- the descriptionpublic java.lang.String getDescription()
setDescription(java.lang.String)
public void setUser(java.lang.String uid)
getConnection
is invoked.
uid
- the default CA IDMS user id, ignored it nullIdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getUser()
setUser(java.lang.String)
public void setPassword(java.lang.String pwd)
IdmsDataSource.getConnection()
method is invoked.
pwd
- the property valueIdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getPassword()
setPassword(java.lang.String)
public void setAccountInfo(java.lang.String s)
Detailed information is available in the CA IDMS Server User Guide.
s
- accounting informationgetAccountInfo()
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getAccountInfo()
setAccountInfo(java.lang.String)
public void setProgramName(java.lang.String s)
s
- program namegetProgramName()
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getProgramName()
setProgramName(java.lang.String)
public void setRoleName(java.lang.String s)
s
- the property valuepublic java.lang.String getRoleName()
setRoleName(java.lang.String)
public void setNetworkProtocol(java.lang.String s)
jdbc:idms:
jdbc:idms://
jdbc:idms://
s
- either "CCI", "TCP", or "IDMS", anything else is ignoredCCI
,
TCP
,
IDMS
,
setNodeName(java.lang.String)
,
setTaskCode(java.lang.String)
,
setServerName(java.lang.String)
,
setPortNumber(int)
public java.lang.String getNetworkProtocol()
setNetworkProtocol(java.lang.String)
public void setServerName(java.lang.String s)
s
- the server namesetNetworkProtocol(java.lang.String)
,
setNodeName(java.lang.String)
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getServerName()
setServerName(java.lang.String)
public void setPortNumber(int p)
It is usually not needed with the Type 2 driver (CCI), since there is usually only one CCITCP region per operating system image.
It is needed with the Type 3 driver (TCP), unless there is only a single version of the JDBC server using the default port on the host.
It is usually needed with the Type 4 driver (IDMS), since each CV rquires a different port. A recommended convention is to derive the port number from the system number, for example SYST0099 would listen on port 3799. Common port numbers:
p
- the TCP/IP portsetNetworkProtocol(java.lang.String)
,
setServerName(java.lang.String)
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public int getPortNumber()
setPortNumber(int)
public void setDatabaseName(java.lang.String s)
When nodeName is not set, this is interpreted as the name of a logical "data source" (in the ODBC sense, not to be confused with the JDBC class) in the CA IDMS configuration file (or registry in Windows). The DBNODE and all other connection properties are accessed from this definition. Note that this definition is accessed from the local machine when networkProtocol is "CCI" and from the JDBC Server's machine for "TCP".
s
- the DICTNAME or DSNsetNetworkProtocol(java.lang.String)
,
setNodeName(java.lang.String)
public java.lang.String getDatabaseName()
setDatabaseName(java.lang.String)
public void setDefaultSchema(java.lang.String s)
s
- the default schema namepublic java.lang.String getDefaultSchema()
setDefaultSchema(java.lang.String)
public void setNodeName(java.lang.String s)
s
- the DBNODEsetNetworkProtocol(java.lang.String)
,
setDatabaseName(java.lang.String)
,
setViaNodeName(java.lang.String)
,
setTaskCode(java.lang.String)
,
setServerName(java.lang.String)
,
setPortNumber(int)
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getNodeName()
setNodeName(java.lang.String)
public void setViaNodeName(java.lang.String s)
This property is ignored when nodeName is null. It is not supported by the Type 4 driver, which uses the DBTABLE defined in the CV for equivalent routing.
s
- the via DBNODEsetDatabaseName(java.lang.String)
,
setNetworkProtocol(java.lang.String)
,
setNodeName(java.lang.String)
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getViaNodeName()
setViaNodeName(java.lang.String)
public void setTaskCode(java.lang.String s)
s
- the TASK codesetDatabaseName(java.lang.String)
,
setNetworkProtocol(java.lang.String)
,
setNodeName(java.lang.String)
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getTaskCode()
setTaskCode(java.lang.String)
public void setConnectSuspend(boolean b)
true
the
will execute an SQL SUSPEND immediately after establishing a
the connection to CA IDMS. This can be especially useful when
the connection pool contains a minimum number of connections
to prevent these connections from allocating unused tasks.
The default for an IdmsDataSource object is false, while
the default for an IdmsConnectionPoolDataSource object is true.
b
- true to enable connectSuspendIdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public boolean getConnectSuspend()
setConnectSuspend(boolean)
public void setSuspendStrategy(java.lang.String s)
IdmsDriverInterface.INTERACTIVE
IdmsDriverInterface.SERVICE
IdmsDriverInterface.BATCH
IdmsDriverInterface.CUSTOM
s
- suspend strategy, ignored if not one of the aboveIdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public java.lang.String getSuspendStrategy()
setSuspendStrategy(java.lang.String)
public void setExternalWait(short w)
w
- the wait intervalsetDatabaseName(java.lang.String)
,
setNetworkProtocol(java.lang.String)
,
setNodeName(java.lang.String)
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public short getExternalWait()
setExternalWait(short)
public void setResourceInterval(short w)
w
- the resource intervalsetDatabaseName(java.lang.String)
,
setNetworkProtocol(java.lang.String)
,
setNodeName(java.lang.String)
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public short getResourceInterval()
setResourceInterval(short)
public void setServerLength(int l)
l
- the requested buffer lengthsetDatabaseName(java.lang.String)
,
setNetworkProtocol(java.lang.String)
,
setNodeName(java.lang.String)
,
IdmsJdbcDriver.getPropertyInfo(java.lang.String, java.util.Properties)
public int getServerLength()
setExternalWait(short)
public void setServerTrace(int t)
CSATST06
CSATST08
CSATST16
t
- trace flagssetDatabaseName(java.lang.String)
,
setNetworkProtocol(java.lang.String)
,
setNodeName(java.lang.String)
public int getServerTrace()
setExternalWait(short)
public boolean isSsl()
public void setSsl(boolean ssl)
ssl
- true to specify an SSL connectionpublic void setIdentityAudited(boolean enable)
enable
- true to enable, false to disablepublic boolean isIdentityAudited()
public void list(java.io.PrintWriter out)
out
- the output writerlist(TraceOutput)
public void list(TraceOutput out)
out
- the trace output logpublic IdmsConnection getIdmsConnection() throws java.sql.SQLException
java.sql.SQLException
- if an error occurs.public IdmsConnection getIdmsConnection(java.lang.String uid, java.lang.String pwd) throws java.sql.SQLException
uid
- the IDMS user id, can't be null, IDMS will complainpwd
- the IDMS password, can be null if IDMS not secured
java.sql.SQLException
- if an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |