Specify the secondary server and enable HDR using the following connection properties in the connection URL:
The following example shows a connection URL for an HDR server pair named hdr1 and hdr2:
jdbc:informix-sqli://123.45.67.89:1533/testDB: INFORMIXSERVER=hdr1;IFXHOST=host1;PORTNO=1500; user=rdtest;password=test;INFORMIXSERVER_SECONDARY=hdr2; IFXHOST_SECONDARY=host2;PORTNO_SECONDARY=1600; ENABLE_HDRSWITCH=true;
When using a DataSource object, you can set and get the secondary server connection properties with setXXX() and getXXX() methods. These methods are listed with their corresponding connection property in the section Getting and Setting Informix Connection Properties.
You can manually redirect a connection to the secondary server in an HDR pair by editing the INFORMIXSERVER, PORTNO, and IFXHOST properties in the connection URL. Manual redirection requires editing the application code and then restarting the application.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]