Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Is there something wrong with this POJO?

With respect to GigaSpaces, is there something wrong with this POJO class and its base class? No, this is not a tricky question :-)

@SpaceClass(replicate = true, persist = false, fifo = false) public class GSSessionAttributes extends GSSessionDetail<map<string, string="">> {   private static final long serialVersionUID = 6541798495286932460L;

  public GSSessionAttributes()   {   } }

The actual Map is of type java.util.concurrent.ConcurrentHashMap.

And here is the base class:

@SpaceClass(replicate = true, persist = false, fifo = false) class GSSessionDetail<t> implements Serializable {   private static final long serialVersionUID = 2835893986241891593L;

  private String mUserKey = null;   private T mData = null;      GSSessionDetail()   {   }

  @SpaceRouting   public String getUserKey()   {     return mUserKey;   }

  public void setUserKey(String userKey)   {     mUserKey = userKey;   }

  @SpaceProperty   public T getData()   {     return mData;   }

  public void setData(T data)   {     mData = data;   }

  @Override   public String toString()   {     String dataStr = null;     if (mData != null)     {       dataStr = mData.toString();     }          String str = String.format("[mUserKey=%s, mData=[%s]]", mUserKey, dataStr);     return str;   } }

The objects of type GSSessionAttributes are queried by "userKey". "userKey" is used as UID for a different object type. It serves as the link in a parent-child relationship.

Thanks, Vanio

Edited by: Vanio I on Oct 2, 2009 8:48 PM

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3260]{quote}

asked 2009-10-02 16:06:33 -0500

vanio gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

The GSSessionAttributes class given above seems to work fine. Sometimes, however, "orphan" objects of the GSSessionAttributes type are left in the backup after everything is evicted from the primary member of a partition.

Using XAP v6.6.4, "partitioned-sync2backup" topology.


answered 2009-10-02 20:55:44 -0500

vanio gravatar image
edit flag offensive delete link more


Hi Randy,

It is ALLINCACHE. Custom eviction performs "cascade evict" of all "children" objects of a "parent".
No External Data Source.
No filters aside the standard statistics and default security.
Sync remoting to invoke our services in the space.


vanio gravatar imagevanio ( 2009-10-03 22:15:09 -0500 )edit

I've had a suspect but the inconsistent behavior made it impossible for me to prove it out. I actually could never recreate the problem locally even though it was happening in our test environments.

So I wanted to tap into the wisdom of the community :-) without providing a "lead" for potential answer.

GigaSpaces support (thank you, guys, especially on a Sunday!) came back with an explanation: missing @SpaceId.
I am still puzzled as to how come it is working most of the time without @SpaceId...

Anyway - we'll make the change and I hope we'll never see the problem again.

With the thought that this may help somebody else, too:

Best Regards,
\-- Vanio

vanio gravatar imagevanio ( 2009-10-04 10:38:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2009-10-02 16:06:33 -0500

Seen: 53 times

Last updated: Oct 02 '09