Oracle GoldenGate integration 12.2
-----------------------------------

Oracle GoldenGate module provides data replication via Oracle GoldenGate version 12.2.X to GridGain cluster.
NOTE: important that version of Oracle GoldenGate and Oracle GoldenGate Application Adapters should be the same.

To start the replication please follow the steps below.

1. Copy gridgain-goldengate-12.2 folder to GOLDENGATE_ROOT_DIRECTORY directory.

2. Implement DataSourceOperationHandler interface that converts DB updates to cache operation. Copy jar
with the handler to GOLDENGATE_ROOT_DIRECTORY/gridgain-goldengate-12.2 folder.
(see https://www.gridgain.com/docs/latest/integrations/oraclegg/gg-replication)

3. Create GridGain configuration file which contains cluster configuration such as discovery setting, cache
configuration and etc. Make sure that DataSourceOperationHandler is available in this
context. The configuration should be save to GOLDENGATE_ROOT_DIRECTORY/gridgain-goldengate-12.2 folder.

  <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans.xsd">
      <bean id="personOperationHandler" class="org.gridgain.oracle.goldengate.PersonOperationHandler"/>

      <bean class="org.apache.ignite.configuration.IgniteConfiguration">
        ...
      </bean>
  </beans>

4. To configure a GridGain handler you need to create GridGain handler configuration file (for example
GOLDENGATE_ROOT_DIRECTORY/dirprm/gridgain.props) and set the following
properties (see https://www.gridgain.com/docs/latest/integrations/oraclegg/gg-replication):

  # Handler name.
  gg.handlerlist=gridgain

  # Handler class name. This property must have the following value:
  gg.handler.gridgain.type=org.gridgain.oracle.goldengate.GridGainHandler
  # Path to GridGain configuration file.
  gg.handler.gridgain.configurationPath=gridgain-goldengate-12.2/gridgain-configuration.xml
  # Operation handler bean name.
  gg.handler.gridgain.operationHandlerBeanName=personOperationHandler

  # GoldenGate settings
  gg.report.time=30sec
  gg.classpath=gridgain-goldengate-12.2/*

  javawriter.stats.full=TRUE
  javawriter.stats.display=TRUE
  javawriter.bootoptions=-Xmx1024m -Xms1024m -Djava.class.path=ggjava/ggjava.jar:gridgain-goldengate-12.2/log4j.xml

5. Configure GoldenGate Extractor or Replicator with UserExit
(see https://docs.oracle.com/goldengate/1212/gg-winux/GWURF/gg_parameters033.htm#GWURF431) which will use
GridGain Handler. The configuration need to save into GOLDENGATE_ROOT_DIRECTORY/dirprm folder in prm file.
(see https://www.gridgain.com/docs/latest/integrations/oraclegg/gg-handler)
  ...
  SETENV ( GGS_USEREXIT_CONF = "dirprm/gridgain.props")
  CUSEREXIT libggjava_ue.so CUSEREXIT INCLUDEUPDATEBEFORES, PASSTHRU
  ...
