0

Is there currently a workaround for making use of GemfireTemplate class when upgrading to Gemfire 9.0.1?

One of the upgrade requirements is changing all referencing from:

com.gemstone.gemfire to org.apache.geode

However GemfireTemplate dosen't appear to have a corresponding apache geode subclass: http://docs.spring.io/autorepo/docs/spring-data-gemfire/1.7.0.APACHE-GEODE-EA-SNAPSHOT/api/org/springframework/data/gemfire/GemfireTemplate.html

Would it be possible to create a wrapper class to perform the same functionality?

JH9004
  • 17
  • 2

1 Answers1

0

Well...

There is a version of GemfireTemplate (i.e. this) in Spring Data GemFire 2.0.x (Spring Data Release Train Kay), having a current Milestone 1 release (i.e. org.springframework.data:spring-data-gemfire:2.0.0.M1 in the Spring Repos; NOTE: Milestones and Release Candidates are not published to Maven Central), which is based on Pivotal GemFire 9.0.0-beta.1.

We are about to release (see April 3rd, if the date sticks) Spring Data Release Train Kay Milestone 2, which will include Spring Data GemFire 2.0.0.M2, which was upgraded to Pivotal GemFire 9.0.2.

As for Apache Geode, there is Spring Data Geode 1.0.0.INCUBATING-RELEASE (here), which is based on Apache Geode 1.0.0-incubating, which has the same GemfireTemplate (this) for Geode.

I am about to release Spring Data Geode 1.1.0.RELEASE, which will be based on the relatively new Apache Geode 1.1.0 (GA release, non-incubating).

All of the resources you need to know about are here...

  1. Spring Data GemFire project page: http://projects.spring.io/spring-data-gemfire/

  2. Spring Data GemFire Wiki (Compatibility Matrix): https://github.com/spring-projects/spring-data-gemfire/wiki/Spring-Data-GemFire-to-GemFire-Version-Compatibility

  3. Spring Data Commons Wiki (SD Release Trains; see right nav): https://github.com/spring-projects/spring-data-commons/wiki

  4. Maven Central (SD Geode): http://search.maven.org/#search%7Cga%7C1%7Cspring-data-geode

-j

John Blum
  • 7,381
  • 1
  • 20
  • 30
  • As a quick follow up question do you know when the schema will be added for any of the Spring Data Gemfire 2.X will be released to?: http://www.springframework.org/schema/data/gemfire/ – JH9004 Apr 04 '17 at 15:56
  • Spring Data GemFire 2.x (SD Kay) will be released shortly after Spring Framework 5 goes GA, which is in June (June 20th to be exact... https://spring-calendar.cfapps.io, though that could shift slightly). Since, more generally, SD Kay, and specifically, Spring Data GemFire (2.x) has a hard dependency on the core Spring Framework (5.x), it must wait for SF's GA. – John Blum Apr 09 '17 at 21:31
  • looks like GemfireTemplate is restricted per region. It can only query/update the region which the template was created with. Why spring create a template with such limitation ? And what to do if I would like to query cross regions ? – Jackie Nov 01 '17 at 15:14
  • Well, the idea is, you are supposed to create a `GemfireTemplate` per Region. Part of the reason the template class is only tied to a single Region is to make it "Thread-safe" (which is guaranteed by the Spring container's initialization safety). Technically, it is possible to "reset" the Region on the template since GemfireTemplate extends GemfireAccessor, but I don't recommend it! – John Blum Nov 01 '17 at 16:53
  • I'd also add that the GemfireTemplate, like many data store specific templates (e.g. `MongoTemplate` in _Spring Data MongoDB_) follow the Template pattern, and are modeled after the `JdbcTemplate` in the core Spring Framework. Typically, you do not change the "`DataSource`" that a particular instance of the `JdbcTemplate` is tied to, you simply create another `JdbcTemplate` with that `DataSource`. – John Blum Nov 01 '17 at 17:00