Opening a connection to the CONNX JDBC Driver

The JDBC method getConnection(xxx) is used to make a connection to the JDBC data source. Several different getConnection() methods exist in JDBC. The URL remains constant in both of the methods, as this is where the driver- specific information is placed. The URL is concatenated with the following attributes:

jdbc:connx:
 

DD=Symbolic Name for Data Source
 

GATEWAY=TCPIP address or hostname of Server/Router
 

PORT=7510
 

SSL=true

 

The example below demonstrates a getConnection call for CONNX based on the following criteria:

Additionally - support for multiple JDBC Servers and/or Data servers has been added to the CDD server name fields and the JDBC connection string.

 

<servername>[:<port>][!<servername>[:<port>]][!<servername>[:<port>]]...

 

Note:  Each instance of <servername>[:<port>] is spearated by an exclaimation (!) mark.

 

For example - if you have two JDBC servers set up for redundancy - one on a server called PRIMARY, listening on port 7323

and another server called SECONDARY, listening on port 8754, the gateway server name would be:

 

PRIMARY:7323!SECONDARY:8754

 

When a list of servers is provided - CONNX will initially pick one at random.  If the connection fails for that server, it will then serially loop through

all the servers from that point forward, wrapping back around to the beginning if necessary, until all options are exhausted, or a successful connection is established.

 

Type the above criteria on the command line in your system or within the Java program code.

Related Topics

image\CHICLET.jpg To load and register the CONNX JDBC Driver