Yes, your approach is also ok. I was about to create the servlet I have
mentioned. Now I'm wondering which one is the best approach.
About reloading rules with declared types, yes, there is a known issue. They
are added multiple times in the classloader leading to ClassCastExceptions.
We are working on a solution. It would be nice if you could file an issue in
Jboss' jira (
) to keep track about the progress.
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @
Hi Esteban,
To start up the notifier and scanner service I modified the Drools-Server
ResourceChangeScannerBeanFactory as documented in this post:
http://drools.46999.n3.nabble.com/drools-server-resource-change-scanner-n...
I’m just wondering whether this is the right approach or if I should
consider a Servlet as you have suggested. Did you have a particular reason
for this approach?
BTW another caveat is that Declared Facts will not rebuild correctly, they
just seem to get lost although other rules not dependent on any declared
facts will fire normally. Using POJO’s is fine. Using new-instance =true
will throw an error when a merge of the rules is attempted. I think this is
a know issue with the rule agent.
Regards Ross
*From:* rules-users-bounces(a)lists.jboss.org [mailto:
rules-users-bounces(a)lists.jboss.org] *On Behalf Of *Esteban Aliverti
*Sent:* Friday, 15 April 2011 10:40 PM
*To:* Rules Users List
*Subject:* Re: [rules-users] Drools server and knowledge agent
functionality
Hi.
You can configure a Knowledge Agent in Drools-Server using spring. You have
to declare it in knowledge-services.xml config file. You need to do
something like:
<drools:kagent id="kagent1" kbase="kbase1"
new-instance="false">
<drools:resources>
<drools:resource type="DRL"
source="file:/some/path/to/apache-tomcat-7.0.6/webapps/drools-server/WEB-INF/classes/test.drl"/>
<drools:resource type="PKG" source="
http://somehost:8080/droolg-guvnor/.../LATEST"/>
</drools:resources>
</drools:kagent>
For configure the scan interval, you can use:
<drools:resource-change-scanner id="s1" interval="5" />
There are, though, some caveats:
- If you are deploying drools-server in tomcat, then you can't use
classpath resources in the kagent. I have reported this problem today.
- drools-server doesn't start ResourceChangeNotifierService
nor ResourceChangeScannerService automatically. You need to hack some way to
invoke ResourceFactory.getResourceChangeNotifierService().start();
and ResourceFactory.getResourceChangeScannerService().start();. I was
thinking in a Servlet that calls these methods in its init() method.
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @
http://www.plugtree.com
- Blog @
http://ilesteban.wordpress.com
2011/4/15 Manuel Ortiz <manuel.ortizramos(a)gmail.com>
Hello everybody:
I am taking a look at Drools Integration documentation to understand how
Drools server works and how can be used, and have a doubt concerning, let's
say... 'KnowledgeAgent capabilities'. Does Drools server support on the fly
rule updating as when using KnowledgeAgent to create KnowledgeBase objects?
If it does, where can be configured 'KnowledgeAgent related' properties such
as newInstance or resource scanner interval?
Thank you in advance for your time.
Kind regards,
Manuel Ortiz.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
------------------------------
This e-mail is sent by Suncorp Group Limited ABN 66 145 290 124 or one of
its related entities "Suncorp".
Suncorp may be contacted at Level 18, 36 Wickham Terrace, Brisbane or on 13
11 55 or at suncorp.com.au.
The content of this e-mail is the view of the sender or stated author and
does not necessarily reflect the view of Suncorp. The content, including
attachments, is a confidential communication between Suncorp and the
intended recipient. If you are not the intended recipient, any use,
interference with, disclosure or copying of this e-mail, including
attachments, is unauthorised and expressly prohibited. If you have received
this e-mail in error please contact the sender immediately and delete the
e-mail and any attachments from your system.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users