DataSource Connection Parameters

The DataSource connection attributes are typically defined within an application server (for example WebSphere or Tomcat). They can also be defined on a setup screen or through an XML or Java property file.
cadts
The DataSource connection attributes are typically defined within an application server (for example WebSphere or Tomcat). They can also be defined on a setup screen or through an XML or Java property file.
This page contains the following topics:
DatacomDataSource
The DatacomDataSource class implements the JDBC DataSource interface, and is used with an application server provided by the Java Naming and Directory Interface (JNDI) naming service to establish a connection to a CA Datacom database.
DataSource properties conform to the JavaBeans naming conventions and are implicitly defined by public setter and getter methods. For example, the description property, which is required for all DataSource implementations, is set using the setDescription(String) method. The application server can use the java.lang.reflection methods to discover DataSource properties and provide an interface to set them, or can simply require that they are defined in some configuration file.
DataSource properties are used to specify the connection parameters. These properties are the equivalent of the DriverPropertyInfo attributes described in the previous section, and can be used to completely define the parameters needed to connect to a database. Like a URL, a DataSource object can also reference an ODBC style data source name, where the connection parameters are defined in the registry on Windows, the configuration file on z/OS or UNIX, or even in the properties file.
  • ApplicationID
    Specifies the application identification. Enter the same applid that is found in the startup JCL for the server application running on the mainframe.
  • ConnectType
    Specifies the type of connection. Enter CCI for CAICCI or TCP for native TCP/IP connection (z/OS only).
  • DataSourceName
    Specifies the logical data source name. Container provided DataSource implementations use this to name the ConnectionPoolDataSource object. The DataSource implementation does not use this internally.
  • description
    Specifies the data source description. This property is required of all DataSource implementations.
  • HostName
    Specifies the host name. Enter the host name or IP address for the host on which the mainframe server resides.
  • HostPort
    Specifies the port number for the host. Enter the CCI port number specified in the mainframe CCI address space if connecting through CCI.
    Enter the TCP/IP port number (z/OS only) specified in the mainframe server startup if connecting through TCP/IP or the default (5465) TCP/IP port number.
  • networkProtocol
    Specifies TCP or CCI.
    • TCP indicates that the connection is through the JDBC Proxy, and must be used when the JDBC driver is not running on Windows or the mainframe.
    • CCI indicates that the connection is through CAICCI, either CAICCI-PC on Windows or ENF on a mainframe.
  • password
    Specifies the default user ID password. The application can override this when the connection is established. The getter method does not return the value.
  • PortNumber
    Specifies the TCP/IP port number (z/OS only) of the JDBC Proxy or CCITCP address space, depending on the value of networkProtocol.
  • serverName
    Specifies the TCP/IP server name (z/OS only). When networkProtocol is TCP, it refers to the machine where the JDBC Proxy is running, which can be on any platform. When networkProtocol is CCI, it refers to the mainframe where the CCITCP address space is running.
  • System ID
    Specifies the system identification. Enter the CAICCI system ID of the mainframe environment to which the workstation is to connect. This is the SYSID name specified in the CAICCI startup JCL.
  • user
    Specifies the default user ID to sign on to
    CA Datacom®
    . The application can override this when the connection is established.
DatacomConnectionPoolDataSource
The DatacomConnectionPoolDataSource class implements the JDBC ConnectionPoolDataSource interface, and is used with an application server that provides container managed connection pooling to establish a pooled connection to a CA Datacom database.
An application server typically provides visible DataSource implementation that references a ConnectionPoolDataSource and is exposed to the application as a standard DataSource. Connection pooling is transparent to the application.
The DatacomConnectionPoolDataSource is used by the application server connection pool manager to administer the pool of connections for a particular data source.
  • initialPoolSize
    Specifies the number of connections that the pool manager should initially allocate.
  • maxIdleTime
    Specifies the interval in seconds that a pooled connection can be idle before it is closed.
  • maxPoolSize
    Specifies the maximum number of connections that the pool manager should allocate.
  • MaxStatements
    Specifies the maximum statement pool size not used.
  • minPoolSize
    Specifies the minimum number of available connections that the pool manager should maintain.
  • propertyCycle
    Specifies the interval in seconds that the pool manager should wait before enforcing these policies.
For more information about deploying and using DataSource and ConnectionPoolDataSource objects to connect to a database, see
JDBC 4.0 Specification
, available at www.java.sun.com. Detailed information for these interfaces is also included in the JSDK javadoc.
Detailed information about the
CA Datacom® Server
implementation methods is included in the installed javadoc that can be optionally selected when custom installation is chosen (
CA Datacom® Server
11.exe).
JDBC Connection Options Summary
There are several ways to define
CA Datacom® Server
connection information. Commonly used options are as follows:
  • When using the JDBC driver with a Servlet, EJB, or other application running an application server, all information can be defined in a DatacomDataSource, or more likely, a DatacomConnectionPoolDataSource object, and accessed using the container's JNDI implementation. It is not necessary to define an ODBC style data source.
  • When using the JDBC driver in a stand-alone Java application on Windows or z/OS, a JNDI implementation is generally not available, and it is usually convenient to reference an ODBC style data source in a CA Datacom URL, accessed using the DriverManager. The ODBC style data source is defined in the registry on Windows and the configuration file on the mainframe.
  • When using the JDBC driver in an applet or stand-alone application that connects using the JDBC Proxy, it is usually most convenient to reference an ODBC style data source defined on the machine where the JDBC Proxy invokes the native client interface.