Cool.. Thanks folks!<br><br><div class="gmail_quote">On Fri, Apr 2, 2010 at 3:48 PM, Ansgar Konermann <span dir="ltr">&lt;<a href="mailto:ansgar.konermann@googlemail.com">ansgar.konermann@googlemail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">On 03.04.2010 00:40, Amit Kumar wrote:<br>
&gt; Hi Folks,<br>
&gt;<br>
&gt; I am trying to create a .pkg file (for probably faster loading) from a<br>
&gt; .drl file<br>
&gt;<br>
&gt; Does anybody has a code snippet which I can use. Am unable to find it<br>
&gt; in javadocs.<br>
<br>
</div></div>Hi,<br>
<br>
from what we figured out at work, they&#39;re just plain serialized<br>
knowledge packages (or rather, collections thereof). IIRC, this is also<br>
described somewhere in the docs.<br>
<br>
So all you need to do is:<br>
- create the knowledge packages in-memory using the normal<br>
KnowledgeBuilder api calls (loads of documentation available for this)<br>
- use java object serialization to write a Collection&lt;KnowledgePackage&gt;<br>
into a file.<br>
<br>
Upon loading these packages, make sure all the classes used/imported in<br>
the *.drl files are available on the classpath, otherwise you probably<br>
won&#39;t be able to deserialize the packages.<br>
<br>
Kind regards<br>
<font color="#888888"><br>
Ansgar<br>
</font><div><div></div><div class="h5"><br>
<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>
</div></div></blockquote></div><br>