why this entry not can be deserialized?
alexandre alessi <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
package framework.exemples.primos;
import framework.*;
public class TaskPrimos extends GenericTask
{
public ResultPrimos resultado;
public Integer length;
public Integer [] nums;
public Integer [] primos;
public Integer quant=new Integer(0);
public TaskPrimos()
{
}
public TaskPrimos(Integer nums[])
{
this.length = new Integer(nums.length);
this.nums = nums;
}
// public void run()
// {
// resultado = (PrimosResult) execute();
// }
//
public Boolean isPrime(int num)
{
double raiz = Math.sqrt(num);
for (int i=2;i<=raiz;i++)
{
if (num % i == 0)
{
return new Boolean (false);
}
}
return new Boolean (true);
}
public AbstractResult execute()
{
int j=0;
ResultPrimos resultado = new ResultPrimos();
for (int i=0;i<length.intValue();i++)
{
if (isPrime(nums[i].intValue()).booleanValue())
{
primos[j++] = nums[i];
quant = new Integer(j);
}
}
System.out.println("passou por aqui");
resultado.quant = quant;
resultado.primos = primos;
return resultado;
}
}
the exception raised:
net.jini.core.entry.UnusableEntryException
net.jini.core.entry.UnusableEntryException
at com.sun.jini.outrigger.EntryRep.throwNewUnusableEntryException(EntryRep.java:914)
at com.sun.jini.outrigger.EntryRep.entry(EntryRep.java:490)
at com.sun.jini.outrigger.SpaceProxy.entryFrom(SpaceProxy.java:556)
at com.sun.jini.outrigger.SpaceProxy.take(SpaceProxy.java:420)
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html
JDC members can download the JavaSpaces(tm) Technology from:
http://developer.java.sun.com/developer/products/jini/