[rules-users] KnowledgeBase & Classloader - reload class or re-create

Nicholas Hemley nic.hemley at sidonis.com
Wed Oct 14 11:10:17 EDT 2009


Edson,

 

Actually, I only use custom action classes in the RHS (see below)

 

e.g.

rule TEARDOWN_3004865719

                when

                                child0:MyClass (

                                                state1 == 0,

                                                state2 == 0

                                )

                then

                                MyFunctions.performOperation( "TEARDOWN
_3004865719",

                                                 "message",

                                                 child0,

                                                 true );

                end

 

The classes referenced in the LHS will always stay the same.

 

So if we want to re-load the class MyFunctions (since these custom actions
may be updated), then I currently have to re-create the
StatefulKnowledgeSession from a new KnowledgeBase, etc. so that the
findClass() method is called on MyClassLoader.

 

Cheerio,

Nic

 

Nicholas Hemley

Senior Developer

Sidonis | Powering a New Generation of Service Assurance

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091014/a2db1574/attachment.html 


More information about the rules-users mailing list