Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

This chapter describes how to integrate with TOMCAT using the FailOver function provided by ALTIBASE.

...

1. When specifying a JNDI DatSource in the context.xml file, specify the FailOver related properties in the Connection URL part.

Code Block
<context>
<Resource name="jdbc/Altibase" auth="Container" type="javax.sql.DataSource"
driverClassName="Altibase.jdbc.driver.AltibaseDriver"
maxActive="100" maxIdle="-1" maxWait="-1"
username="sys" password="manager"
url="jdbc:Altibase://192.168.6.224:21129/mydb?
AlternateServers=(192.168.1.35:21129)&amp;
ConnectionRetryCount=3&amp;
ConnectionRetryDelay=3&amp;
SessionFailOver=on&amp;
LoadBalance=off"
validationQuery="SELECT 1 FROM DUAL" testOnBorrow="true"
removeAbandoned="true" removeAbandonedTimeout="60"
logAbandoned="true" />
</context>
  • Refer to the FailOver/server.xml file

FailOver related properties are as follows. For more detailed information, please refer to the Replication Manual.

AlternateServer

Indicates the alternate servers to be connected when a failure occurs (IP Address1:Port1, IP Address2:Port2,...).

 

ConnectionRetryCount

The number of tries of connection attempts when an alternative server connection fails.

 

ConnectionRetryDelay

Time to wait before attempting to connection connect when the alternative server connection fails (in seconds)

LoadBalance

When set to on, random selection is made including default server and alternate servers when the first connection is attempted. If set to off, it connects to the default server when it tries to connect for the first time, and if it fails, it connects to the server described by AlternateServer.

SessionFailOver

Indicates whether to perform STF (Service Time Fail-Over)

on : STF, off : CTF
The CTF (Connection Time Fail-Over) recognizes a failure at the time of DBMS connection and connects to the DBMS of another available node instead of the DBMS where the failure occurred and proceeds with the service.
STF (Service Time Fail-Over) means that a failure occurs during service by successfully connecting to the DBMS, accessing the DBMS of another available node to restore the properties of the session, and then performing the task logic of the user application again. That is, it is the case that it is necessary to perform the operation performed in the DBMS where the failure occurred once again.

For the implementation method of CTF and STF, please refer to the FailOver technical document.