[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-2541) KnowledgeAgent: Add the possibility to add custom KnowledgeBuilderConfiguration

Esteban Aliverti (JIRA) jira-events at lists.jboss.org
Mon Jun 14 19:03:46 EDT 2010


     [ https://jira.jboss.org/browse/JBRULES-2541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Esteban Aliverti resolved JBRULES-2541.
---------------------------------------

    Fix Version/s: 5.1.0.CR1
       Resolution: Done


> KnowledgeAgent: Add the possibility to add custom KnowledgeBuilderConfiguration  
> ---------------------------------------------------------------------------------
>
>                 Key: JBRULES-2541
>                 URL: https://jira.jboss.org/browse/JBRULES-2541
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: drools-api, drools-core
>    Affects Versions: 5.1.0.M2
>            Reporter: Esteban Aliverti
>            Assignee: Esteban Aliverti
>             Fix For: 5.1.0.CR1
>
>
> KnowledgeAgentImpl works in two ways according to newInstance config parameter:
> When newInstance = true:
>    Every time the agent detects a modification in a monitored resuorce, a new KBase is created, and all the modifications are applied there. If a previous KBase exists (If a KBase was passed to the constructor), the KnowledgeBaseConfiguration object of the original KBase is reused when the new KBase is created.
> When newInstance = false:
>    The KnowledgeBase is never recreated. If no KBase was supplied on constructor, a new KBase is created and reused thereafter. If a KBase is passed, it is used every time the KAgent processes a change set. 
> Whether newInstance = true or newInstance = false, the KBase used by the Kagent could have custom ClassLoaders, and that's fine. The problem is that if the KBase is using custom ClassLoaders is because the contained resources use classes defined outside the current ClassLoader. So, when one of this resources changes, the KAgent needs to compile it (if it is not already a PKG). The problem here is that the KBuilder used for compilation is a "fresh" KnowledgeBuilder without any custom ClassLoader thus, a Rule Compilation error occurs.
> This problem also arise when newInstance=true and the modified resource is compiled previous to perform a binary diff.
> So, the KnowledgeAgent needs to receive a KnowledgeBuilderConfiguration object that needs to be used in every internal builder the KAgent uses.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list