<br>   Sobhana, <br><br>   This is very important feedback. Would you be able to create an isolated test case showing this problem? This would be the quickest way for us to fix it.<br><br>   On a related note, everything should be compiled at compile time, including MVEL stuff. If that is not happening, we need to check what mvel is doing internally.<br>
<br>   Thanks,<br>      Edson<br><br><div class="gmail_quote">2009/6/4 Sobhana <span dir="ltr">&lt;<a href="mailto:sobhanarich@yahoo.com">sobhanarich@yahoo.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
hi,<br>
<br>
Our application uses Drools 4.0.7 and Hibernate 3.x. We use the BRMS to<br>
compile the rules from drl files (using java dialect) into rule packages<br>
which are updated into the rule base using the rule agent.<br>
<br>
We have seen that MVEL rules are compiled when the rules are fired for the<br>
first time. If the fact passed at the first run contains a Hibernate proxy<br>
(subclass of the original object) and we later re-use the compiled rule on<br>
the fact containing the original object, we get a ClassCastException.<br>
However, if we pass the fact containing the original object in the first<br>
run, there is no problem for further runs.<br>
<br>
Why are the rules not compiled when we create the package using the BRMS?<br>
How can we enable precompilation so that the type is taken as the original<br>
object itself?<br>
<br>
Thanks,<br>
Sobhana<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/Why-are-MVEL-rules-compiled-on-first-access--tp23874950p23874950.html" target="_blank">http://www.nabble.com/Why-are-MVEL-rules-compiled-on-first-access--tp23874950p23874950.html</a><br>

Sent from the drools - user mailing list archive at Nabble.com.<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>
</font></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>