Click on Javadoc link to open Javadoc documentation.
Package
org.gridgain.grid.spi.communication.coherence Javadoc![]()
Description
Oracle Coherence implementation of GridCommunicationSpi ![]()
![]()
| Libraries Coherence is not shipped with GridGain. If you don't have Coherence, you need to download it separately. See http://www.oracle.com/tangosol/index.html |
| Multiple Instances In VM When using Coherence SPI (communication or discovery) you cannot start multiple GridGain instances in the same VM due to Mule limitiation. GridGain runtime will detect this situation and prevent GridGain from starting in such case. See GridSpiMultipleInstancesSupport |
Configuration
The following configuration parameters can be used to configure GridCoherenceCommuncationSpi ![]()
| Setter Method | Description | Optional | Default |
|---|---|---|---|
| setServiceName(String) |
Sets Coherence invocation service name created and used by GridGain. | Yes | gridgain.comm.srvc |
| setAcknowledgment(boolean) |
Sets message acknowledgments on or off. | Yes | false |
Examples
As any GridGain SPI, GridCoherenceCommunicationSpi ![]()
![]()
GridCoherenceCommunicationSpi commSpi = new GridCoherenceCommunicationSpi(); // Override default false setting. commSpi.setAcknowledgement(true); GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // Override default communication SPI. cfg.setCommunicationSpi(commSpi); // Start grid. GridFactory.start(cfg);
or from Spring configuration file
<bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfigurationAdapter" singleton="true"> ... <property name="communicationSpi"> <bean class="org.gridgain.grid.spi.communication.coherence.GridCoherenceCommunicationSpi"> <property name="acknowledgment" value="true"/> </bean> </property> ... </bean>

For more information about using Spring framework for configuration click here.
