Class JDBC_PING

All Implemented Interfaces:
Lifecycle

public class JDBC_PING extends FILE_PING
Discovery protocol using a JDBC connection to a shared database. Connection options can be defined as configuration properties, or the JNDI name of a DataSource can be provided (avoid providing both).

Both the schema and the used SQL statements can be customized; make sure the order of parameters of such customized SQL statements is maintained and that compatible types are used for the columns. The recommended schema uses a single table, with two String columns being used primary key (local address, cluster name) and a third column to store the serialized form of the objects needed by JGroups.

A default table will be created at first connection, errors during this operation are not considered critical. Set the initialize_sql to an empty value to prevent this initial table creation, or change it to create a customized table.

Since:
2.12
  • Field Details

    • connection_url

      protected String connection_url
    • connection_username

      protected String connection_username
    • connection_password

      protected String connection_password
    • connection_driver

      protected String connection_driver
    • initialize_sql

      protected String initialize_sql
    • insert_single_sql

      protected String insert_single_sql
    • delete_single_sql

      protected String delete_single_sql
    • clear_sql

      protected String clear_sql
    • select_all_pingdata_sql

      protected String select_all_pingdata_sql
    • contains_sql

      protected String contains_sql
    • datasource_jndi_name

      protected String datasource_jndi_name
    • datasource_injecter_class

      protected String datasource_injecter_class
    • dataSource

      protected DataSource dataSource
  • Constructor Details

    • JDBC_PING

      public JDBC_PING()
  • Method Details