Quantcast
Channel: Gigaspaces XAP forum - RSS feed
Viewing all articles
Browse latest Browse all 1486

Remoting serivce route incorrectly?

$
0
0
Hi! I have this method in my remoting interface: > void create(@Routing("getId") User> user); getId returns a java.lang.Long object. If I invoke this method with an id that's something low, for example 100, everything works great. The end object is created in the and returns correctly. If the id is really high, for example 6986832704440059829, I get an error later in the stack when I try to create the object. It tells me that the object should not be in this partition. Here is the exact message: > Operation is rejected - the routing> value in the written entry of type> 'com.company.User' does not match this> space partition id. The value within> the entry's routing property named> 'id' is 6986832704440059829 which> matches partition id 2 while current> partition id is 1. So far, we have done a workaround by creating wrapper classes around Long/Integer and also Strings(they suffer from this as well) and implementing a custom hashCode(java.util.Objects.hash). But it feels wrong with this worwkaround. java.lang.Long for example should work with any value. So my question is, is this a bug? If so, will it be fixed? Or am I doing something wrong?

Viewing all articles
Browse latest Browse all 1486

Trending Articles