[rules-users] Why are MVEL rules compiled on first access?

Edson Tirelli tirelli at post.com
Thu Jun 4 14:40:48 EDT 2009


   Sobhana,

   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.

   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.

   Thanks,
      Edson

2009/6/4 Sobhana <sobhanarich at yahoo.com>

>
> hi,
>
> Our application uses Drools 4.0.7 and Hibernate 3.x. We use the BRMS to
> compile the rules from drl files (using java dialect) into rule packages
> which are updated into the rule base using the rule agent.
>
> We have seen that MVEL rules are compiled when the rules are fired for the
> first time. If the fact passed at the first run contains a Hibernate proxy
> (subclass of the original object) and we later re-use the compiled rule on
> the fact containing the original object, we get a ClassCastException.
> However, if we pass the fact containing the original object in the first
> run, there is no problem for further runs.
>
> Why are the rules not compiled when we create the package using the BRMS?
> How can we enable precompilation so that the type is taken as the original
> object itself?
>
> Thanks,
> Sobhana
>
> --
> View this message in context:
> http://www.nabble.com/Why-are-MVEL-rules-compiled-on-first-access--tp23874950p23874950.html
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090604/1b728ac0/attachment.html 


More information about the rules-users mailing list