2.4.9. ha service configuration

The ha (High Availability) service is required in order to replicate stateful session beans (SFSBs).

The ha service uses JGroups as a group communication protocol (GCP).

Here is the part of jonas.properties related to ha service:

###################### JOnAS HA service configuration
#
# Set the name of the implementation class of the HA service.
jonas.service.ha.class    org.ow2.jonas.ha.internal.HaServiceImpl

# Set the JGroups configuration file name
jonas.service.ha.jgroups.conf jgroups-ha.xml 1

# Set the JGroups group name
jonas.service.ha.jgroups.groupname jonas-rep 2

# Set the SFSB backup info timeout. The info stored in the backup node is removed when the timer expires.
jonas.service.ha.gc.period 600 3

# Set the datasource for the tx table
jonas.service.ha.datasource jdbc_1 4

# Reconnection timeout for JGroups Channel, if it's closed on request.
jonas.service.ha.reconnection.timeout 5000 5

1

Set the name of the JGroups configuration file.

2

Set the name of the JGroups group.

3

Set the period of time (in seconds) the system waits before cleaning useless replication information.

4

Set the JNDI name of the datasource corresponding to the database where is located the transaction table used by the replication mechanism.

5

Set the delay to wait for a reconnection.

[Note] Note

Refer to the clustering guide for issues related to JGroups.