Skip to content

Commit 1b46224

Browse files
artembilangaryrussell
authored andcommitted
INT-4398: Replace Gemfire dependency with Geode (#2426)
* INT-4398: Replace Gemfire dependency with Geode JIRA: https://jira.spring.io/browse/INT-4398 * Polishing `gemfire.adoc` and mention the procedure for an exclusion/inclusion appropriate dependency * More Docs polishing * * Fix tests to be based on SD Geode XML namespace * Fix Docs according PR comments * Polishing Docs according PR comments
1 parent 9d66861 commit 1b46224

File tree

6 files changed

+50
-35
lines changed

6 files changed

+50
-35
lines changed

build.gradle

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -386,16 +386,9 @@ project('spring-integration-gemfire') {
386386
description = 'Spring Integration GemFire Support'
387387
dependencies {
388388
compile project(":spring-integration-core")
389-
compile ("org.springframework.data:spring-data-gemfire:$springGemfireVersion") {
390-
exclude group: 'org.springframework', module: 'spring-aop'
391-
exclude group: 'org.springframework', module: 'spring-beans'
392-
exclude group: 'org.springframework', module: 'spring-context'
393-
exclude group: 'org.springframework', module: 'spring-context-support'
394-
exclude group: 'org.springframework', module: 'spring-core'
395-
exclude group: 'org.springframework', module: 'spring-tx'
396-
exclude group: 'org.springframework', module: 'spring-oxm'
397-
}
389+
compile ("org.springframework.data:spring-data-geode:$springGemfireVersion")
398390
compile "commons-io:commons-io:$commonsIoVersion"
391+
399392
testCompile project(":spring-integration-stream")
400393

401394
}

spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests-context.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<beans xmlns="http://www.springframework.org/schema/beans"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xmlns:gfe="http://www.springframework.org/schema/gemfire"
4+
xmlns:gfe="http://www.springframework.org/schema/geode"
55
xmlns:int="http://www.springframework.org/schema/integration"
66
xmlns:util="http://www.springframework.org/schema/util"
77
xmlns:int-gfe="http://www.springframework.org/schema/integration/gemfire"
88
xmlns:context="http://www.springframework.org/schema/context"
99
xsi:schemaLocation="http://www.springframework.org/schema/integration/gemfire http://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd
10-
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
10+
http://www.springframework.org/schema/geode http://www.springframework.org/schema/gemfire/spring-geode.xsd
1111
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
1212
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
1313
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd

spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/GemfireInboundChannelAdapterTests-context.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<beans xmlns="http://www.springframework.org/schema/beans"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xmlns:gfe="http://www.springframework.org/schema/gemfire"
4+
xmlns:gfe="http://www.springframework.org/schema/geode"
55
xmlns:int-gfe="http://www.springframework.org/schema/integration/gemfire"
66
xsi:schemaLocation="http://www.springframework.org/schema/integration/gemfire
77
http://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd
8-
http://www.springframework.org/schema/gemfire
9-
http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
8+
http://www.springframework.org/schema/geode
9+
http://www.springframework.org/schema/gemfire/spring-geode.xsd
1010
http://www.springframework.org/schema/beans
1111
http://www.springframework.org/schema/beans/spring-beans.xsd">
1212

spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/GemfireOutboundChannelAdapterTests-context.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xmlns:int-gfe="http://www.springframework.org/schema/integration/gemfire"
55
xmlns:int="http://www.springframework.org/schema/integration"
6-
xmlns:gfe="http://www.springframework.org/schema/gemfire"
6+
xmlns:gfe="http://www.springframework.org/schema/geode"
77
xsi:schemaLocation="http://www.springframework.org/schema/integration/gemfire http://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd
8-
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
8+
http://www.springframework.org/schema/geode http://www.springframework.org/schema/gemfire/spring-geode.xsd
99
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
1010
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
1111

spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/util/AggregatorWithGemfireLocksTests-context.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<beans xmlns="http://www.springframework.org/schema/beans"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xmlns:int="http://www.springframework.org/schema/integration"
5-
xmlns:gfe="http://www.springframework.org/schema/gemfire"
5+
xmlns:gfe="http://www.springframework.org/schema/geode"
66
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
7-
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
7+
http://www.springframework.org/schema/geode http://www.springframework.org/schema/gemfire/spring-geode.xsd
88
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
99

1010
<gfe:cache use-bean-factory-locator="false"/>

src/reference/asciidoc/gemfire.adoc

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,38 @@
11
[[gemfire]]
2-
== GemFire Support
2+
== Pivotal GemFire and Apache Geode Support
33

4-
Spring Integration provides support for VMWare vFabric GemFire
4+
Spring Integration provides support for Pivotal GemFire and Apache Geode
55

66
[[gemfire-intro]]
77
=== Introduction
88

9-
VMWare vFabric GemFire (GemFire) is a distributed data management platform providing a key-value data grid along with advanced distributed system features such as event processing, continuous querying, and remote function execution.
10-
This guide assumes some familiarity with http://www.vmware.com/support/pubs/vfabric-gemfire.html[GemFire] and its http://www.vmware.com/support/developer/vfabric-gemfire/662-api/index.html[API].
9+
GemFire is a distributed data management platform providing a key-value data grid along with advanced distributed system features such as event processing, continuous querying, and remote function execution.
10+
This guide assumes some familiarity with the commercial https://pivotal.io/pivotal-gemfire[Pivotal GemFire] or Open Source http://geode.apache.org[Apache Geode].
1111

12-
Spring integration provides support for GemFire by providing inbound adapters for entry and continuous query events, an outbound adapter to write entries to the cache, and `MessageStore` and `MessageGroupStore` implementations.
13-
Spring integration leverages thehttp://www.springsource.org/spring-gemfire[Spring Gemfire] project, providing a thin wrapper over its components.
12+
Spring integration provides support for GemFire implementing inbound adapters for entry and continuous query events, an outbound adapter to write entries to the cache, and Message & Metadata stores and `GemfireLockRegistry` implementations.
13+
Spring integration leverages the http://projects.spring.io/spring-data-gemfire[Spring Data for Pivotal GemFire] project, providing a thin wrapper over its components.
14+
15+
Starting with _version 5.1_, the Spring Integration GemFire module uses the https://github.com/spring-projects/spring-data-geode[Spring Data for Apache Geode] transitive dependency by default.
16+
To switch to the commercial Pivotal GemFire based Spring Data for Pivotal GemFire, exclude `spring-data-geode` from dependencies and add `spring-data-gemfire`:
17+
18+
[source,xml]
19+
----
20+
<dependency>
21+
<groupId>org.springframework.integration</groupId>
22+
<artifactId>spring-integration-gemfire</artifactId>
23+
<exclusions>
24+
<exclusion>
25+
<groupId>org.springframework.data</groupId>
26+
<artifactId>spring-data-geode</artifactId>
27+
</exclusion>
28+
</exclusions>
29+
</dependency>
30+
31+
<dependency>
32+
<groupId>org.springframework.data</groupId>
33+
<artifactId>spring-data-gemfire</artifactId>
34+
</dependency>
35+
----
1436

1537
To configure the 'int-gfe' namespace, include the following elements within the headers of your XML configuration file:
1638
[source,xml]
@@ -24,7 +46,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/gemfire
2446
=== Inbound Channel Adapter
2547

2648
The _inbound-channel-adapter_ produces messages on a channel triggered by a GemFire `EntryEvent`.
27-
GemFire generates events whenever an entry is CREATED, UPDATED, DESTROYED, or INVALIDATED in the associated region.
49+
GemFire generates events whenever an entry is `CREATED`, `UPDATED`, `DESTROYED` or `INVALIDATED` in the associated region.
2850
The inbound channel adapter allows you to filter on a subset of these events.
2951
For example, you may want to only produce messages in response to an entry being CREATED.
3052
In addition, the inbound channel adapter can evaluate a SpEL expression if, for example, you want your message payload to contain an event property such as the new entry value.
@@ -43,7 +65,7 @@ By default CREATED and UPDATED are enabled.
4365
Note that this adapter conforms to Spring integration conventions.
4466
If no `channel` attribute is provided, the channel will be created from the `id` attribute.
4567
This adapter also supports an `error-channel`.
46-
The GemFire http://www.gemstone.com/docs/current/product/docs/japi/com/gemstone/gemfire/cache/EntryEvent.html[EntryEvent] is the `#root` object of the `expression` evaluation.
68+
The GemFire hhttps://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/EntryEvent.html[EntryEvent] is the `#root` object of the `expression` evaluation.
4769
Example:
4870
[source]
4971
----
@@ -56,13 +78,13 @@ If the `expression` attribute is not provided, the message payload will be the G
5678
=== Continuous Query Inbound Channel Adapter
5779

5880
The _cq-inbound-channel-adapter_ produces messages a channel triggered by a GemFire continuous query or `CqEvent` event.
59-
Spring GemFire introduced continuous query support in release 1.1, including a `ContinuousQueryListenerContainer` which provides a nice abstraction over the GemFire native API.
81+
Spring Data introduced continuous query support in release `1.1`, including a `ContinuousQueryListenerContainer` which provides a nice abstraction over the GemFire native API.
6082
This adapter requires a reference to a ContinuousQueryListenerContainer, and creates a listener for a given `query` and executes the query.
6183
The continuous query acts as an event source that will fire whenever its result set changes state.
6284

6385
NOTE: GemFire queries are written in OQL and are scoped to the entire cache (not just one region).
6486
Additionally, continuous queries require a remote (i.e., running in a separate process or remote host) cache server.
65-
Please consult the http://www.gemstone.com/docs/6.6.RC/product/docs/html/user_guide/UserGuide_GemFire.html#Continuous%20Querying[GemFire documentation] for more information on implementing continuous queries.
87+
Please consult the http://gemfire82.docs.pivotal.io/docs-gemfire/gemfire_nativeclient/continuous-querying/continuous-querying.html[GemFire documentation] for more information on implementing continuous queries.
6688

6789

6890
[source,xml]
@@ -83,16 +105,16 @@ Please consult the http://www.gemstone.com/docs/6.6.RC/product/docs/html/user_gu
83105
query="select * from /test"/>
84106
----
85107

86-
In the above configuration, we are creating a GemFire client cache (recall a remote cache server is required for this implementation and its address is configured as a sub-element of the pool), a client region and a `ContinuousQueryListenerContainer` using Spring GemFire.
108+
In the above configuration, we are creating a GemFire client cache (recall a remote cache server is required for this implementation and its address is configured as a sub-element of the pool), a client region and a `ContinuousQueryListenerContainer` using Spring Data.
87109
The continuous query inbound channel adapter requires a `cq-listener-container` attribute which contains a reference to the `ContinuousQueryListenerContainer`.
88110
Optionally, it accepts an `expression` attribute which uses SpEL to transform the `CqEvent` or extract an individual property as needed.
89111
The cq-inbound-channel-adapter provides a `query-events` attribute, containing a comma separated list of event types for which a message will be produced on the input channel.
90-
Available event types are CREATED, UPDATED, DESTROYED, REGION_DESTROYED, REGION_INVALIDATED.
91-
CREATED and UPDATED are enabled by default.
112+
Available event types are `CREATED`, `UPDATED`, `DESTROYED`, `REGION_DESTROYED` and `REGION_INVALIDATED`.
113+
`CREATED` and `UPDATED` are enabled by default.
92114
Additional optional attributes include, `query-name` which provides an optional query name, and `expression` which works as described in the above section, and `durable` - a boolean value indicating if the query is durable (false by default).
93115
Note that this adapter conforms to Spring integration conventions.
94116
If no `channel` attribute is provided, the channel will be created from the `id` attribute.
95-
This adapter also supports an `error-channel`
117+
This adapter also supports an `error-channel`.
96118

97119
[[gemfire-outbound]]
98120
=== Outbound Channel Adapter
@@ -128,7 +150,7 @@ This adapter also supports the `order` attribute which may be useful if it is bo
128150

129151
As described in EIP, a http://www.eaipatterns.com/MessageStore.html[Message Store] allows you to persist Messages.
130152
This can be very useful when dealing with components that have a capability to buffer messages (_QueueChannel, Aggregator, Resequencer_, etc.) if reliability is a concern.
131-
In Spring Integration, the MessageStore strategy also provides the foundation for thehttp://www.eaipatterns.com/StoreInLibrary.html[ClaimCheck] pattern, which is described in EIP as well.
153+
In Spring Integration, the MessageStore strategy also provides the foundation for the http://www.eaipatterns.com/StoreInLibrary.html[ClaimCheck] pattern, which is described in EIP as well.
132154

133155
Spring Integration's Gemfire module provides the `GemfireMessageStore` which is an implementation of both the the `MessageStore` strategy (mainly used by the _QueueChannel_ and _ClaimCheck_ patterns) and the `MessageGroupStore` strategy (mainly used by the _Aggregator_ and _Resequencer_ patterns).
134156

@@ -152,7 +174,7 @@ Spring Integration's Gemfire module provides the `GemfireMessageStore` which is
152174
----
153175

154176
In the above example, the cache and region are configured using the spring-gemfire namespace (not to be confused with the spring-integration-gemfire namespace).
155-
Often it is desirable for the message store to be maintained in one or more remote cache servers in a client-server configuration (See the http://www.vmware.com/support/pubs/vfabric-gemfire.html[GemFire product documentation] for more details).
177+
Often it is desirable for the message store to be maintained in one or more remote cache servers in a client-server configuration.
156178
In this case, you configure a client cache, client region, and client pool and inject the region into the MessageStore.
157179
Here is an example:
158180
[source,xml]
@@ -175,7 +197,7 @@ Note the _pool_ element is configured with the address of a cache server (a loca
175197
The region is configured as a 'PROXY' so that no data will be stored locally.
176198
The region's id corresponds to a region with the same name configured in the cache server.
177199

178-
Starting with version _4.3.12_, the `GemfireMessageStore` supports the key `prefix` option to allow distinguishing between instances of the store on the same Gemfire region.
200+
Starting with version _4.3.12_, the `GemfireMessageStore` supports the key `prefix` option to allow distinguishing between instances of the store on the same GemFire region.
179201

180202
[[gemfire-lock-registry]]
181203
=== Gemfire Lock Registry

0 commit comments

Comments
 (0)