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

Ask Your Question
0

readIfExists / readById

Hi,

I noticed a difference in behaviour in the code snippets below:

Blah blah = new Blah(); blah.setId(id); return space.readIfExists( blah, ReadModifiers.READ_COMMITTED );

and:

return space.readById(Blah.class, id, ReadModifiers.READ_COMMITTED);

The second example seems to fail to read through a transaction which take/writes the Blah object.

Is there any way to use readIfExist style blocking with readById?

Kind regards, Arjan Lamers

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

asked 2009-08-10 10:47:09 -0500

arjanl 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
0

Have you tried the readIfExistsById:
http://www.gigaspaces.com/docs/JavaDoc7.0/org/openspaces/core/GigaSpace.html#readIfExistsById(java.lang.Class,%20java.lang.Object,%20java.lang.Object,%20long)

Shay

answered 2009-08-10 11:03:03 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

ROFL. Totally missed that one.

Thanks!

arjanl gravatar imagearjanl ( 2009-08-10 12:41:38 -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

Stats

Asked: 2009-08-10 10:47:09 -0500

Seen: 69 times

Last updated: Aug 10 '09