Red Hat Training

A Red Hat training course is available for Red Hat JBoss Data Virtualization

Chapter 3. Multiple Hosts

3.1. Using Multiple Hosts

JBoss Data Virtualization may be clustered over several servers utilizing failover and load balancing.
The easiest way to enable these features is for the client to specify multiple hostname and port number combinations in the URL connection string as a comma separated list of host:port combinations:
jdbc:teiid:<vdb-name>@mm://host1:31000,host1:31001,host2:31000;version=2
If you are connecting with the data source class, the setAlternateServers method can be used to specify the failover servers. The format is also a comma separated list of host:port combinations.
The client randomly selects one of the JBoss Data Virtualization servers from the list and establishes a session with that server. If a connection cannot be established, then each of the remaining servers will be tried in random order. This allows for both connection time failover and random server selection load balancing.