[jboss-user] [JBoss Cache: Core Edition] - Data gravitation not work if you create two nodes with same

kenees do-not-reply at jboss.com
Mon Dec 22 07:38:49 EST 2008


I have two cluster nodes, nodeA and nodeB deployed on WLS 10.3, the demo code is very simple, I list the step is follow:

1. create a FQN using: Fqn.fromString("/testRegion");
2. create a Cache with default "total-replication.xml" configuration, and store it in a servelet property, so all the request can use the same Cache instance.
3. create a war of this app and deploy it into WLS.
4. send requests to the cluster, Node A and B receive requests and save data with the Cache created in step2 and FQN created in step1.

Then my question comes out, I put (key=A, value=11) on nodeA and then put (key=B, value=22) on nodeB, so the cluster will have the following data description:

NodeA [(key=A, value=11)]
NodeB [(key=B, value=22)]

OK, then I'm going to try to get B on NodeA by calling method:
Cache.get(testRegion, "B")

I was hope that data can be retrieved from NodeB, but nothing happen, I did set dataGravitation auto="true" before doing this test.

By tracing the code I found that there is a nodeDoesNotExist method in DataGravitatorInterceptor, only when it returns true the Interceptor should do the job -- Gravitation.

I'm not sure is this a right behavior? Because I think it's common that different cluster nodes can have the same FQN node but with different items, when they have set to be buddy and data gravitation, one cluster node down, the other cluster node should try to retrieve data from the backup no matter it has the FQN or not. 

Am i wrong? Please correct me.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197980#4197980

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197980

More information about the jboss-user mailing list