Dear Jess Users,
I am trying to embed a Rete engine inside a mobile
agent and I want to restore the Rete engine to the
exact same status when the agent travels to a new
computer.But I found the Rete engine didn't serialize
its fact list. Any solutions? Thanks
Xiangjun Xu
I have attached an example below.
//===============================================
Rete engine;
// ...
ByteArrayOutputStream mem= new
ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(mem);
out.writeObject(engine);
byte[] engdata = mem.toByteArray();
out.close();
engine.executeCommand("(facts)");
ObjectInputStream in = new ObjectInputStream(new
ByteArrayInputStream(engdata));
engine = (Rete)in.readObject();
in.close();
engine.executeCommand("(facts)"); // show "0 facts"!
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------