Menu Close
Settings Close

Language and Page Formatting Options

Red Hat Training

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

5.2. Installing in Domain Mode

The Domain mode is for multiple server instances. It requires load balancing capable for handling TCP for JDBC connections. (Apache will not work in this case.)
When you have more than one Red Hat JBoss EAP instance in your server farm and you start them all in domain mode, all of the configuration options for this server farm can be centrally managed. For example, you can deploy an artifact or create a data source across all the instances, with one single CLI-based call. Red Hat JBoss Data Virtualization extends this configuration concept to allow you to deploy your VDBs and translators across the whole server farm.
When domain mode is combined with the HA (high availability) profile, you can cluster the Red Hat JBoss Data Virtualization server instances that are deployed. (The HA profile is set as the default in the domain.xml file.) When you start the server using the domain.xml file, the distributed caching that is used for ResultSet caching and Internal Materialized caching is automatically configured. You use the Admin API the same way in both the standalone mode and the domain mode.
When multiple Red Hat JBoss Data Virtualization instances are available in a cluster, you can make use load balancing and fail-over features.
You must create a server group, then create a server and then deploy all the available resources to the server group you have created.
The following instructions teach you how to install a systemd service on Linux. For other use cases, please refer to
  1. To start the server in "Domain" mode, install Red Hat JBoss Data Virtualization on all the servers that are going to be part of the cluster. Select one of the servers as the "master" domain controller. (The rest of the servers will be slaves that connect to the "master" domain controller for all the administrative operations.)
  2. On the domain controller, copy the domain-controller/init.d directory to JBOSS_HOME/bin.
  3. On the host controller, copy the host-controller/init.d directory to JBOSS_HOME/bin.
  4. Prepare the directory structure:
    adduser jboss
    mkdir /opt/jdv
    mkdir /etc/jboss-as
    mkdir /var/log/jboss
    mkdir /var/run/jboss
    chown -R jboss: /opt/jdv
    chown -R jboss: /etc/jboss-as
    chown -R jboss: /var/log/jboss
    chown -R jboss: /var/run/jboss
  5. Configure the domain:
    cat > /etc/jboss-as/jboss-as.conf <<EOF
  6. Configure the host controller:
    cat > /etc/jboss-as/jboss-as.conf <<EOF
  7. Add this Red Hat JBoss Data Virtualization script to systemd:
    cat > /tmp/teste <<EOF
    Description=JBoss Data Virtualization Systemctl script
    ExecStart=$JBOSS_HOME/bin/init.d/ start
    ExecStop=$JBOSS_HOME/bin/init.d/ stop
    ExecReload=$JBOSS_HOME/bin/init.d/ restart
  8. Configure the firewall ports on both hosts:
    cat > /etc/firewalld/services/jboss-data-virtualization.xml
    <?xml version="1.0" encoding="utf-8"?>
    <service version="1.0">
        <port port="31000" protocol="tcp"/>
        <port port="8080" protocol="tcp"/>
        <port port="8443" protocol="udp"/>
        <port port="8009" protocol="tcp"/>
        <port port="4447" protocol="tcp"/>
        <port port="9990" protocol="udp"/>
        <port port="9999" protocol="tcp"/>
    firewall-cmd --zone=public --add-service=jboss-data-virtualization
    firewall-cmd --permanent --zone=public --add-service=jboss-data-virtualization
    firewall-cmd --zone=public --list-services
    firewall-cmd --permanent --zone=public --list-services
    If you are using port offsets, adjust the values by adding the offset.
  9. Once you have configured all the servers, start the "master" node:
  10. Start the "slave" nodes:
    The slave nodes fetch their domain configuration settings from the "master" node.
  11. Once VDBs have been deployed, users can connect their JDBC applications to Red Hat JBoss Data Virtualization.
  12. You can enable Red Hat JBoss Data Virtualization as a service with the operating system, using this command:
    systemctl enable jboss-data-virtualization
    You can now start the service like this:
    systemctl start jdv
    To stop it, run this command:
    systemctl stop jdv
    To restart, run this command:
    systemctl restart jdv


Teiid Designer cannot connect to the Red Hat JBoss Data Virtualization Server in "domain" mode. Red Hat recommends using other types of deployment strategies (such as CLI or web-console) for deploying and testing, as it is expected you will be using domain mode in production environments. Teiid Designer is to aid development-time activities only and should only be used in testing environments.