2

I set up a Spring Session Gemfire client application connecting to a gfsh-create Gemfire server.

However, unless I load ALL the jar files that contain class definitions used by attributes attached to the GemFireSession on the Gemfire server (via the classpath property when creating a server using gfsh) the session persistence fails (ClassNotFoundException's, etc.)

Is there any way to configure Spring Session Gemfire to not require the client classes to be available on the server side?

txk
  • 166
  • 3

1 Answers1

0

No, to properly handle Session replication, the Spring Session Data GemFire support currently uses the GemFire DataSerialization framework, not PDX, which is the same as GemFire's own HTTP Session Management module.

I do have an open issue to revisit this, but at the time, there were several limitations in PDX (compared to the pure GemFire DataSerialization framework) in order to support all the functionality required in Spring Session, such as deltas.

Minimally, you just need your application domain objects that are being stored in the Session to be on the GemFire Servers classpath when starting from Gfsh.

Ideally, you could configure your GemFire Servers with Spring as a Spring Boot application that would have all your dependencies already on the classpath, and you could even configure the Spring Session portion of the GemFire Server with Spring Session's @EnableGemFireHttpSession. That will in effect setup the required Region (storing Session state) along with any expiration policy.

-John

John Blum
  • 7,381
  • 1
  • 20
  • 30