cuba-platform / documentation

CUBA Platform Documentation
https://www.cuba-platform.com
Creative Commons Attribution 4.0 International
26 stars 45 forks source link

Mention ability to use JDBC_PING in jgroups.xml #597

Open alexbudarov opened 4 years ago

alexbudarov commented 4 years ago

Environment

Description of the bug or enhancement

Mention that you can use JDBC_PING in jgroups.xml instead of TCPPING, with example. It does not require to specify full list of members. It requires a relational DBMS but of course any CUBA app has it.

Example for PostgreSQL and default CUBA datasource JNDI name:

    <JDBC_PING async_discovery="true"
               datasource_jndi_name="java:comp/env/jdbc/CubaDS"
               initialize_sql="create table if not exists JGROUPSPING (
               own_addr varchar(200) not null,
               cluster_name varchar(200) not null,
               ping_data bytea,
               primary key (own_addr, cluster_name))"/>