Ok. I put that in but I'm having trouble getting it to recognize the uri I'm
passing in.  I'm passing in
"file:///c:/svn/code/sleuth/src/net/intellidata/sleuth/description/rules/"
and I'm getting the following exception:

RuleAgent(default) INFO (Mon Apr 07 13:14:40 MDT 2008): Configuring with
newInstance=true, secondsToRefresh=300

RuleAgent(default) INFO (Mon Apr 07 13:14:40 MDT 2008): Configuring package
provider : URLScanner monitoring URLs:
file:/c:/svn/code/sleuth/src/net/intellidata/sleuth/description/rules/ with
local cache dir of .

java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection

            at
org.drools.agent.HttpClientImpl.checkLastUpdated(HttpClientImpl.java:26)

            at org.drools.agent.URLScanner.hasChanged(URLScanner.java:141)

            at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:108)

            at
org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:88)

            at
org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330)

            at
org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298)

            at org.drools.agent.RuleAgent.configure(RuleAgent.java:284)

            at org.drools.agent.RuleAgent.init(RuleAgent.java:208)

            at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:176)

            at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:148)

            at
net.intellidata.sleuth.description.rules.DescriptionRuleLoader.loadRules(Des
criptionRuleLoader.java:48)

            at
net.intellidata.sleuth.description.rules.DescriptionRuleLoaderTest.testDescr
iptionRuleLoader(DescriptionRuleLoaderTest.java:32)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)

            at java.lang.reflect.Method.invoke(Unknown Source)

            at junit.framework.TestCase.runTest(TestCase.java:154)

            at junit.framework.TestCase.runBare(TestCase.java:127)

            at junit.framework.TestResult$1.protect(TestResult.java:106)

            at junit.framework.TestResult.runProtected(TestResult.java:124)

            at junit.framework.TestResult.run(TestResult.java:109)

            at junit.framework.TestCase.run(TestCase.java:118)

            at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3T
estReference.java:130)

            at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)

            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)

            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)

            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)

            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)

 

The goal here is to monitor the directory above for any changes to the files
or additional files that show up.  Any help would be appreciated.

 

___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
3173 s. uravan way
aurora, colorado 80013
T: 720.524.4864
[EMAIL PROTECTED]

 

From: Paul Browne [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2008 3:56 PM
To: [EMAIL PROTECTED]; Rules Users List
Subject: Re: [rules-users] Hot Deployment

 

Brian,

I'm guessing that you mean the RuleAgent Class. The Javadoc on this class
gives more info.

Code sample (assuming that you have the BRMS setup as per the doc). You'll
need to change to whatever settings are appropriate for your BRMS.

            Properties prop = new Properties(); 
            prop.setProperty("url",uri);
            prop.setProperty("newInstance", "true");
            prop.setProperty("localCacheDir", ".");
            prop.setProperty("poll", "300"); // poll every 300 seconds for
hot deployment.
            
            //Get a new RuleBase using these properties
            RuleAgent agent = RuleAgent.newRuleAgent(prop);
            RuleBase rb = agent.getRuleBase(); 

Then use the RuleBase as normal

Paul

Brian Trezise wrote: 

In the What's New? Section of the Drools 4.0 documentation there is a
reference in 1.1.2 to a "Rules Engine Agent for hot deployment and BRMS
integration".  This would be ideal for the application I am currently
developing.  However, this is the only mention of this agent anywhere in the
documentation.  Does anybody know anything about this, how to use it, any
documentation about it?

Thanks,

 

___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
3173 s. uravan way
aurora, colorado 80013
T: 720.524.4864
[EMAIL PROTECTED]

 

 



  _____  



 
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
  

 

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to