<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
It won't detect changes on the classpath. Needs to be file or http.<br>
<br>
Mark<br>
On 03/11/2010 21:49, Jason Davidson wrote:
<blockquote
cite="mid:AANLkTi=PT2w2M7Z0aQQA6=KD7ByQSYZfjmyeCWjk6KON@mail.gmail.com"
type="cite">Hello,
<div><br>
</div>
<div>Any tips on this? I'm seeing this same behavior using Drools
5.1.1:</div>
<div><br>
</div>
<div>Spring Beans:</div>
<div>
<p style="margin: 0px; font: 11px Monaco; color: rgb(83, 119,
199);">
<span style="color: rgb(0, 0, 0);"> </span><!-- Drools :
--></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"><</span>drools:resource-change-scanner<span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(146, 39, 143);">id</span><span style="color: rgb(0, 0,
0);">=</span><span style="color: rgb(65, 61, 252);">"scanner"</span><span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(146, 39, 143);">interval</span><span style="color:
rgb(0, 0, 0);">=</span><span style="color: rgb(65, 61,
252);">"10"</span><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);">/></span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"><</span>drools:kbase<span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(146, 39, 143);">id</span><span style="color: rgb(0, 0,
0);">=</span><span style="color: rgb(65, 61, 252);">"ruleKBase"</span><span
style="color: rgb(0, 144, 145);">></span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"></</span>drools:kbase<span
style="color: rgb(0, 144, 145);">></span><span
style="color: rgb(0, 0, 0);"> </span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(65, 61,
252);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"><</span><span
style="color: rgb(80, 143, 144);">drools:kagent</span><span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(146, 39, 143);">id</span><span style="color: rgb(0, 0,
0);">=</span>"kagent1"<span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(146, 39, 143);">kbase</span><span
style="color: rgb(0, 0, 0);">=</span>"ruleKBase"<span
style="color: rgb(0, 144, 145);">></span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"><</span>drools:resources<span
style="color: rgb(0, 144, 145);">></span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(65, 61,
252);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"><</span><span
style="color: rgb(80, 143, 144);">drools:resource</span><span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(146, 39, 143);">type</span><span style="color: rgb(0, 0,
0);">=</span>"CHANGE_SET"<span style="color: rgb(0, 0, 0);">
</span><span style="color: rgb(146, 39, 143);">source</span><span
style="color: rgb(0, 0, 0);">=</span>"classpath:drools-changeset.xml"<span
style="color: rgb(0, 144, 145);">/></span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"></</span>drools:resources<span
style="color: rgb(0, 144, 145);">></span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"></</span>drools:kagent<span
style="color: rgb(0, 144, 145);">></span></p>
<div>
<br>
</div>
Changeset:</div>
<div>
<p style="margin: 0px; font: 11px Monaco; color: rgb(65, 61,
252);"><span style="color: rgb(0, 144, 145);"><</span><span
style="color: rgb(80, 143, 144);">change-set</span><span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(146, 39, 143);">xmlns</span><span style="color: rgb(0,
0, 0);">=</span>'<a moz-do-not-send="true"
href="http://drools.org/drools-5.0/change-set">http://drools.org/drools-5.0/change-set</a>'</p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(65, 61,
252);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(146, 39, 143);">xmlns:xs</span><span
style="color: rgb(0, 0, 0);">=</span>'<a
moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>'</p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(65, 61,
252);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(146, 39, 143);">xs:schemaLocation</span><span
style="color: rgb(0, 0, 0);">=</span>'<a
moz-do-not-send="true"
href="http://drools.org/drools-5.0/change-set">http://drools.org/drools-5.0/change-set</a>
<a moz-do-not-send="true"
href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd</a>'<span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(0, 144, 145);">></span><span style="color: rgb(0, 0,
0);"> </span></p>
<p style="margin: 0px; font: 11px Monaco;"> <span
style="color: rgb(0, 144, 145);"><</span><span
style="color: rgb(80, 143, 144);">add</span><span
style="color: rgb(0, 144, 145);">></span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(65, 61,
252);"><span style="color: rgb(0, 0, 0);"> </span><span
style="color: rgb(0, 144, 145);"><</span><span
style="color: rgb(80, 143, 144);">resource</span><span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(146, 39, 143);">source</span><span style="color: rgb(0,
0, 0);">=</span>"<a moz-do-not-send="true"
href="http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST">http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST</a>"</p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(146, 39,
143);"><span style="color: rgb(0, 0, 0);"> </span>type<span
style="color: rgb(0, 0, 0);">=</span><span style="color:
rgb(65, 61, 252);">'PKG'</span><span style="color: rgb(0, 0,
0);"> </span>basicAuthentication<span style="color: rgb(0,
0, 0);">=</span><span style="color: rgb(65, 61, 252);">"enabled"</span><span
style="color: rgb(0, 0, 0);"> </span>username<span
style="color: rgb(0, 0, 0);">=</span><span style="color:
rgb(65, 61, 252);">"admin"</span><span style="color: rgb(0,
0, 0);"> </span>password<span style="color: rgb(0, 0, 0);">=</span><span
style="color: rgb(65, 61, 252);">"admin"</span><span
style="color: rgb(0, 0, 0);"> </span><span style="color:
rgb(0, 144, 145);">/></span></p>
<p style="margin: 0px; font: 11px Monaco;"> <span
style="color: rgb(0, 144, 145);"></</span><span
style="color: rgb(80, 143, 144);">add</span><span
style="color: rgb(0, 144, 145);">></span> </p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);"><span style="color: rgb(0, 144, 145);"></</span>change-set<span
style="color: rgb(0, 144, 145);">></span><span
style="color: rgb(0, 0, 0);"> </span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);">
<span style="color: rgb(0, 0, 0);"><br>
</span></p>
<p style="margin: 0px; font: 11px Monaco; color: rgb(80, 143,
144);"><font class="Apple-style-span" color="#000000"><br>
</font></p>
<div class="gmail_quote">At startup I see that the
KnowledgeAgent registers a listener but never detects changes:</div>
<div class="gmail_quote">
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:506:info] ResourceChangeScanner reconfigured with
interval=60</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:506:info] ResourceChangeScanner created with default
interval=60</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:506:info] ResourceChangeScanner reconfigured with
interval=10</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:528:info] ResourceChangeNotification created</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:528:debug] ResourceChangeNotification monitor added
monitor=org.drools.io.impl.ResourceChangeScannerImpl@616181be</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:529:debug] KnowledgeAgent building resource map</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:529:info] KnowledegAgent has started listening for
ChangeSet notifications</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:529:info] KnowledgeAgent created, with configuration:</p>
<p style="margin: 0px; font: 11px Monaco;">monitorChangeSetEvents=true
scanResources=true scanDirectories=true newInstance=true</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:530:info] KnowledgeAgent applying ChangeSet</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:531:debug] KnowledgeAgent processing sub
ChangeSet=[ClassPathResource path='drools-changeset.xml']</p>
<div>
<p style="margin: 0px; font: 11px Monaco;">
[2010:11:307 15:11:919:debug] KnowledgeAgent notifier
subscribing to resource=[UrlResource path='<a
moz-do-not-send="true"
href="http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST">http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST</a>']</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:920:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@d2a7c1e
to resource=[UrlResource path='<a moz-do-not-send="true"
href="http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST">http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST</a>']</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:920:debug] ResourceChangeScanner subcribing
notifier=org.drools.io.impl.ResourceChangeNotifierImpl@603a9c52
to resource=[UrlResource path='<a moz-do-not-send="true"
href="http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST">http://10.1.109.54:8080/drools-5.1.1-guvnor/org.drools.guvnor.Guvnor/package/com.cjs.jworks.rules.cases/LATEST</a>']</p>
<p style="margin: 0px; font: 11px Monaco;">[2010:11:307
15:11:920:debug] KnowledgeAgent rebuilding KnowledgeBase
using ChangeSet</p>
<p style="margin: 0px; font: 11px Monaco;"><br>
</p>
<p style="margin: 0px; font: 11px Monaco;">Thanks!</p>
<p style="margin: 0px; font: 11px Monaco;">Jason</p>
<p style="margin: 0px; font: 11px Monaco;"><br>
</p>
</div>
</div>
<div class="gmail_quote">2010/9/23 Clandes Tino <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:clandestino_bgd@yahoo.co.uk">clandestino_bgd@yahoo.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">
<div>Hi,</div>
<div>I've also faced the same problem.</div>
<div>Hope somebody could give a hint.</div>
<div> </div>
<div>thanks & best,</div>
<div>milan<br>
<br>
--- On <b>Mon, 20/9/10, Graham Thomson <i><<a
moz-do-not-send="true"
href="mailto:gthomson@fizzback.com"
target="_blank">gthomson@fizzback.com</a>></i></b>
wrote:<br>
</div>
<blockquote style="border-left: 2px solid rgb(16,
16, 255); padding-left: 5px; margin-left: 5px;"><br>
From: Graham Thomson <<a moz-do-not-send="true"
href="mailto:gthomson@fizzback.com"
target="_blank">gthomson@fizzback.com</a>><br>
Subject: [rules-users] Starting resource change
scanner and notifier in drools-server.<br>
To: <a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org"
target="_blank">rules-users@lists.jboss.org</a><br>
Date: Monday, 20 September, 2010, 15:24
<div>
<div class="h5"><br>
<br>
<div><br>
<div><font size="2">Hi,<br>
<br>
I would like to ask for help with
setting up drools-server with Guvnor. I
am using version 5.1.1 of both.<br>
<br>
I am trying to set up an instance of
drools-server in Tomcat that
periodically loads new updates of
packages published in Guvnor (both
drools-server and Guvnor run in the same
instance of Tomcat).<br>
<br>
My change set definition is as follows:<br>
<br>
<?xml version="1.0"
encoding="UTF-8"?><br>
<change-set xmlns='<a
moz-do-not-send="true"
href="http://drools.org/drools-5.0/change-set%27"
rel="nofollow" target="_blank">http://drools.org/drools-5.0/change-set'</a><br>
xmlns:xs='<a moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema-instance%27"
rel="nofollow" target="_blank">http://www.w3.org/2001/XMLSchema-instance'</a><br>
xs:schemaLocation='<a
moz-do-not-send="true"
href="http://drools.org/drools-5.0/change-set"
rel="nofollow" target="_blank">http://drools.org/drools-5.0/change-set</a><br>
<a moz-do-not-send="true"
href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd%27"
rel="nofollow" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'</a>><br>
<add><br>
<resource source='<a
moz-do-not-send="true"
href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/"
rel="nofollow" target="_blank">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/</a><one
of my packages>/LATEST'<br>
type='PKG'
basicAuthentication="enabled"
username="<username>" password=""
/><br>
<resource source="<a
moz-do-not-send="true"
href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/"
rel="nofollow" target="_blank">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/</a><another
of my packages>/LATEST"<br>
type="PKG"
basicAuthentication="enabled"
username="<username>" password=""
/><br>
</add><br>
</change-set><br>
<br>
My knowledge-services.xml configuration
is as follows (based on the unit test
examples highlighted in <a
moz-do-not-send="true"
href="http://article.gmane.org/gmane.comp.java.drools.user/20992/match=drools+spring"
target="_blank">http://article.gmane.org/gmane.comp.java.drools.user/20992/match=drools+spring</a>):<br>
<br>
<?xml version="1.0"
encoding="UTF-8"?><br>
<beans xmlns="<a
moz-do-not-send="true"
href="http://www.springframework.org/schema/beans"
rel="nofollow" target="_blank">http://www.springframework.org/schema/beans</a>"<br>
xmlns:xsi="<a
moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema-instance"
rel="nofollow" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
xmlns:drools="<a
moz-do-not-send="true"
href="http://drools.org/schema/drools-spring"
rel="nofollow" target="_blank">http://drools.org/schema/drools-spring</a>" <br>
xsi:schemaLocation="<a
moz-do-not-send="true"
href="http://www.springframework.org/schema/beans"
rel="nofollow" target="_blank">http://www.springframework.org/schema/beans</a>
<a moz-do-not-send="true"
href="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
rel="nofollow" target="_blank">http://www.springframework.org/schema/beans/spring-beans-2.0.xsd</a><br>
<a
moz-do-not-send="true"
href="http://drools.org/schema/drools-spring"
rel="nofollow" target="_blank">http://drools.org/schema/drools-spring</a>
<a moz-do-not-send="true"
href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd"
rel="nofollow" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd</a>"><br>
<br>
<drools:resource-change-scanner
id="s1" interval="5" /><br>
<br>
<drools:execution-node id="node1"
/><br>
<br>
<drools:ksession id="ksession1"
type="stateless" kbase="kbase1"
node="node1"/><br>
<br>
<drools:kbase id="kbase1"
node="node1" /><br>
<br>
<drools:kagent id="kagent1"
kbase="kbase1"><br>
<drools:resources><br>
<drools:resource
type="CHANGE_SET"
source="classpath:changeset.xml" /><br>
</drools:resources><br>
</drools:kagent><br>
<br>
</beans><br>
<br>
On loading drools-server, the resources
listed in the change set are loaded and
available.<br>
<br>
The problem is that when a new package
built and published in Guvnor,
drools-server does not detect this and
update itself. The effect is the same as
if a KnowledgeAgent were used locally
and<br>
<br>
ResourceFactory.getResourceChangeNotifierService().start();<br>
ResourceFactory.getResourceChangeScannerService().start();<br>
<br>
were not called. This leads me to the
assumption that drools-server does not
start these services by default.<br>
<br>
My question is then can/how do I
configure drools-server to start these
services such that it will update new
changes from Guvnor automatically?<br>
<br>
<br>
Thanks a lot for any help you can offer,<br>
<br>
Cheers,<br>
<br>
Graham.<br>
</font></div>
</div>
<br>
</div>
</div>
-----Inline Attachment Follows-----<br>
<br>
<div>_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="http://uk.mc255.mail.yahoo.com/mc/compose?to=rules-users@lists.jboss.org"
target="_blank">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div>
</blockquote>
</td>
</tr>
</tbody>
</table>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>