<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Keep in mind that using these Declared Types in DRL will have an impact in high volume systems.&nbsp; Each time a knowledge session is initialized, these classes
 are dynamically loaded onto the class-path.&nbsp; This dynamic loading (and unloading) subjects your knowledgesession to a large amount of garbage collection.&nbsp; As a result, if you have a high volume processing system you could very quickly reach a heap exception
 due to insufficient garbage collection.&nbsp; In real-time point processing this does not cause a problem, but in high volume processing it could.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I have noticed that in my high-volume applications, anytime I use decalred types or DRL functions, that my rules run about 20% slower than when I use the exact
 same code in my JAVA system, and have Drools access them as imported functions, and types.&nbsp; (because they are local to the app, Drools does not have to invoke the class loader on all these objects, which does slow down processing time).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Keep in mind, I don&#8217;t know the details of what drools is doing, but I have observed behavior in the JVM via monitoring tools to support this claim at a basic
 level.&nbsp; So go ahead and use declared types, but if you find yourself running into a bunch of weird processing errors, it may be because of the declared types.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>Esteban Aliverti<br>
<b>Sent:</b> Monday, November 14, 2011 3:21 AM<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] programming classes to represent domain in Drools like templates<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">If you don't want to define your model as Java classes you can define it in drl syntax:&nbsp;<a href="http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_single/index.html#d0e3390">http://docs.jboss.org/drools/release/5.3.0.Final/drools-expert-docs/html_single/index.html#d0e3390</a><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Best Regards,<br clear="all">
<br>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
<br>
Esteban Aliverti<br>
- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com
</a><br>
- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On Mon, Nov 14, 2011 at 12:06 PM, santiago carbonell &lt;<a href="mailto:scarbonell@ono.com">scarbonell@ono.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi,<br>
<br>
I'm new in drools and I'm doing some test with this fantastic engine. With<br>
Drools, I've loaded a drl file with some rules and ran with drools engine<br>
and works perfect, but I got to preset/programming some classes in Java<br>
about the domain where rules worked.<br>
<br>
I'd like to load this domain, this &quot;classes&quot; as a file, like drl files, but<br>
insted of rules, I'd like to load classes, or domain, so I'd needn't to<br>
preset/programming this classes in Java.<br>
<br>
My question is how can I load this classes in some file, like drl files with<br>
rules? Is like templates in clips.<br>
<br>
Thanks<br>
<span style="color:#888888"><br>
<br>
<span class="hoenzb">--</span><br>
<span class="hoenzb">View this message in context: <a href="http://drools.46999.n3.nabble.com/programming-classes-to-represent-domain-in-Drools-like-templates-tp3506503p3506503.html" target="_blank">
http://drools.46999.n3.nabble.com/programming-classes-to-represent-domain-in-Drools-like-templates-tp3506503p3506503.html</a></span><br>
<span class="hoenzb">Sent from the Drools: User forum mailing list archive at Nabble.com.</span><br>
<span class="hoenzb">_______________________________________________</span><br>
<span class="hoenzb">rules-users mailing list</span><br>
<span class="hoenzb"><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></span><br>
<span class="hoenzb"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></span></span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>