Serializing any amount of data while other threads might change that data entails the risk of creating an inconsistent snapshot. Mutual exclusion (locking) would be one way, but since there&#39;s no progress during this time anyway you might as well stop the session.<div>
<br></div><div>If you have the memory, serialize to a byte[] and write this out to secondary storage after restarting.<br><br>-W<br><br><br><br><div class="gmail_quote">On 13 July 2012 03:23, chrisLi <span dir="ltr">&lt;<a href="mailto:shengtao0077@163.com" target="_blank">shengtao0077@163.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, droolers,<br>
<br>
I need to serialize the session as a snapshot at 23:00 pm every day. So I<br>
want to do the serialization work<br>
<br>
in a different thread with session execution.<br>
<br>
Is it possible? Or is there any risk?<br>
<br>
Thank you  very much<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Is-it-possible-to-serialzie-the-stateful-session-without-stoping-executing-rules-tp4018645.html" target="_blank">http://drools.46999.n3.nabble.com/Is-it-possible-to-serialzie-the-stateful-session-without-stoping-executing-rules-tp4018645.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br></div>