James Webster
James Webster

Reputation: 33

Is it possible to have 2 Gemfire clients in the same JVM?

I am trying to do a check. I've got a poollocator with two servers. I want to test whether the servers are being set up as Active-Active or Active-Passive? The idea is to insert data with one client from one server and then have another one reading it and check how fast the data is being replicated to the other server (if at all is being replicated).

All this is done in Java.

I was thinking to create a client with a single server configuration. Then another one with the other server. However, I have read other people's posts and apparently this is not possible. Does anyone know if my test is valid?

Upvotes: 1

Views: 102

Answers (1)

Dan Smith
Dan Smith

Reputation: 491

I don't think you can create two GemFire clients in the same JVM. At least not without doing things with Classloaders.

However there are a other ways to measure what you are looking for. GemFire uses synchronous replication. So if you want to measure how long it takes until your data is on both servers, you could measure how long your put operation takes. When your put operations completes the data is already replicated.

Upvotes: 2

Related Questions