The Artima Developer Community
Sponsored Link

Legacy Jini Forum
Make Room For JavaSpaces

Advertisement

Advertisement

This page contains an archived post to the Jini Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Facing a problem in JavaSpace read() operation of array

Posted by Zahooruddin on November 21, 2000 at 5:39 AM

Hello,

I am facing a problem in JavaSpace read() operation of Integer array.
My Entry is shown below, named abcEntry.


import net.jini.core.entry.Entry;

public class abcEntry implements Entry {
public String name;
public Integer[][] score= new Integer[10][10];


public void initArray() {

for (int i=0; i for (int j=0; j score[i][j] = new Integer(0);
}
}
}

public abcEntry() {
}

public abcEntry(String resname) {
this.name=resname;
}
}


The write operation is ok, shown below:


abcEntry res = new abcEntry ("Zahoor");
res.initArray();

JavaSpace space = SpaceAccessor.getSpace();
space.write(res, null, Lease.FOREVER);

BUT the read operation halts and never comes back, it seems
it is not getting the entry. Here is the code,

JavaSpace space = SpaceAccessor.getSpace();

abcEntry template = new abcEntry();

//template.score = null; (Even setting this to null,
//template.name = null; (read is still hanged.)

abcEntry result = (abcEntry) space.read(template, null,
Long.MAX_VALUE);

Can any one help me?
Kindly make a cc of reply to zahoor@kiit.edu.pk
Regards




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us