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

Ask Your Question
0

Inconsistent behaviour?

I ran gigaspace (EAp 7.0.0 m3) with LRU caching and EDS (read-write mode) and experienced strange behaviour. Assume such code:

Data d = new Data(); // very simple POJO mapped to a database with Hibernate d.setId(1L); // set SpaceId gigaSpace.write(d, 1000L); // write with short lease; the object is propagated to DB Data template = new Data(); template.setId(1L); Thread.currentThread().sleep(10000L); // wait, so the object expire Object read = gigaSpace.read(template); // read the object back System.out.println((read == null)?"NULL":"EXISTS"); read = gigaSpace.read(template); System.out.println((read == null)?"NULL":"EXISTS");

When I ran the code I got: NULL EXISTS

I guess when cached missed in LRU mode then an object is read from DB. But the first read failed... Why?

Thank you for your help. h4. Attachments

[my-app.zip|/upfiles/13759712668188206.zip]

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

asked 2009-01-19 16:04:10 -0600

palka gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

Can you post the full test case including the pu.xml? Shay h4. Attachments

[my-app.zip|/upfiles/13759712666655325.zip]

answered 2009-01-25 09:43:17 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Comments

It is based on your maven project. See Feeder class. I run it from Eclipse via IntegratedProcessingUnitContainer.

Edited by: Jan Pálka on Jan 25, 2009 5:35 PM h4. Attachments

[my-app.zip|/upfiles/13759712665823544.zip]

palka gravatar imagepalka ( 2009-01-25 17:27:37 -0600 )edit

Please post this via the support portal. Seems this require a fix: http://www.gigaspaces.com/supportcenter Shay

shay hassidim gravatar imageshay hassidim ( 2009-01-27 13:26:51 -0600 )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-01-19 16:04:10 -0600

Seen: 21 times

Last updated: Jan 25 '09