<!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 bgcolor="#ffffff" text="#000000">
On 04/08/2010 11:06, David Conde wrote:
<blockquote
cite="mid:AANLkTinzmsK5ogb+s9zrgUG4e7=8-BWR8Bx3hjEqbUfr@mail.gmail.com"
type="cite">Thanks Mark,
<div><br>
</div>
<div>Cheers for the info. </div>
<div><br>
</div>
<div>I've seen the OSGi bundle zip (and the boot bundle list [1])
but it seemed to have quite a large amount of dependencies for
just drools-core and drools-compiler. Do you know if all these
bundles are required for this subset? If not would you happen to
have the list of what is?</div>
<div><br>
</div>
<div>If you don't have this handy I'll send it on so that you have
it once I have figured it out :)</div>
</blockquote>
The spring testing framework makes you list all the dependencies
manually, which it resolves against that osgi-bundles.zip contents.
This is the file:<br>
<a class="moz-txt-link-freetext" href="http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/org.drools.osgi.test/src/test/resources/boot-bundles.properties?r=HEAD">http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/org.drools.osgi.test/src/test/resources/boot-bundles.properties?r=HEAD</a><br>
<br>
It does contain a lot more than normal, mostly I just kept adding
stuff intil OSGi would resolve and the unit tests pass. It may be
possible not to include things like jaxb (especially if you are on
jdk6) and some of the other peripheral jars. We have used the spring
repository and sometimes the transitivie dependencies are not left
optional which means they are dragged in, and even if we don't us
them OSGi will not resolve without them there. Maybe check out trunk
and help us work on this and improve it? <br>
<br>
The problem with OSGi is so few dependencies are are published as
OSGi bundles, which means we have to rely on things like the spring
osgi repository. That automates the building of the bundles and
doesn't always handle optional dependencies that well.<br>
<br>
Mark<br>
<blockquote
cite="mid:AANLkTinzmsK5ogb+s9zrgUG4e7=8-BWR8Bx3hjEqbUfr@mail.gmail.com"
type="cite">
<div><br>
</div>
<div>[1] <a moz-do-not-send="true"
href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/osgi-bundles/org.drools.osgi.test/src/test/resources/boot-bundles.properties">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/osgi-bundles/org.drools.osgi.test/src/test/resources/boot-bundles.properties</a></div>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<div><br>
</div>
<div>- Dave</div>
<div><br>
<div class="gmail_quote">2010/8/4 Mark Proctor <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</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;">
<div bgcolor="#ffffff" text="#000000"> The set of OSGi
bundles dependencies can be used here:<br>
<a moz-do-not-send="true"
href="http://www.jboss.org/drools/downloads.html"
target="_blank">http://www.jboss.org/drools/downloads.html</a><br>
<br>
We test against spring:<br>
<a moz-do-not-send="true"
href="http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/org.drools.osgi.test/src/test/java/org/drools/osgi/integrationtests/SimpleOsgiTest.java"
target="_blank">http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/org.drools.osgi.test/src/test/java/org/drools/osgi/integrationtests/SimpleOsgiTest.java</a><br>
<br>
This is our project that builds osgi-bundles and does some
testing of Drools against OSGi:<br>
<a moz-do-not-send="true"
href="http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/"
target="_blank">http://fisheye.jboss.org/browse/JBossRules/trunk/osgi-bundles/</a><br>
<br>
I have done some minimal OSGi docs. OSGI is stil la work
in progress for us and we have only osgi-ified some
aspects Drools, although we have done extensive work on
the classloaders to make it fit better.<br>
<a moz-do-not-send="true"
href="https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-integration/html/ch05.html"
target="_blank">https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-integration/html/ch05.html</a><br>
<br>
Please do test what we have, maybe help us OSGi-ify other
aspects of drools.<br>
<font color="#888888"> <br>
Mark</font>
<div>
<div class="h5"><br>
On 04/08/2010 10:25, David Conde wrote:
<blockquote type="cite">Hi,
<div><br>
</div>
<div>I'm trying to get drools-core and
drools-compiler 5.1 running on spring dm-server.
Does anyone have the minimal list of OSGi bundles
as maven dependencies handy?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Dave <br>
<br>
<div class="gmail_quote">On 25 June 2010 13:59,
mmarmol <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:marcelo.marmol@gmail.com"
target="_blank">marcelo.marmol@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:
0pt 0pt 0pt 0.8ex; border-left: 1px solid
rgb(204, 204, 204); padding-left: 1ex;"> <br>
Hi, I have managed to install Drools-core and
Drools-compiler in my Equinox<br>
osgi environment, I can compile rules and
execute them just fine, I was just<br>
wandering how to configure a KnowledgeAgent
using<br>
KnowledgeBuilderFactoryService and
KnowledgeBaseFactoryService. I managed to<br>
configure one but i am not able to reload
rules when they change at runtime.<br>
I have started ResourceChangeScannerService
and<br>
ResourceChangeNotifierService, changeset
related to the rules file gets read<br>
but no change gets implemented. An idea?<br>
<br>
<br>
Here is the code:<br>
<br>
ResourceFactory.getResourceChangeScannerService().start();<br>
ResourceFactory.getResourceChangeNotifierService().start();<br>
<br>
ServiceReference serviceRef =
bc<br>
.getServiceReference(ServiceRegistry.class.getName());<br>
ServiceRegistry registry =
(ServiceRegistry) bc.getService(serviceRef);<br>
<br>
KnowledgeBuilderFactoryService
knowledgeBuilderFactoryService = registry<br>
.get(KnowledgeBuilderFactoryService.class);<br>
<br>
KnowledgeBaseFactoryService
knowledgeBaseFactoryService = registry<br>
.get(KnowledgeBaseFactoryService.class);<br>
ResourceFactoryService
resourceFactoryService = registry<br>
.get(ResourceFactoryService.class);<br>
<br>
KnowledgeBuilderConfiguration
kbConf = knowledgeBuilderFactoryService<br>
.newKnowledgeBuilderConfiguration(null,
getClass()<br>
.getClassLoader());<br>
<br>
KnowledgeBuilder kbuilder =
knowledgeBuilderFactoryService<br>
.newKnowledgeBuilder(kbConf);<br>
ResourceFactoryService resource
= resourceFactoryService;<br>
kbuilder.add(resource.newFileSystemResource(filePath),<br>
ResourceType.CHANGE_SET);<br>
<br>
if (kbuilder.hasErrors()) {<br>
System.out.println(kbuilder.getErrors());<br>
throw new
RuntimeException(kbuilder.getErrors().toString());<br>
}<br>
<br>
KnowledgeBaseConfiguration
kbaseConf = knowledgeBaseFactoryService<br>
.newKnowledgeBaseConfiguration(null,
getClass()<br>
.getClassLoader());<br>
<br>
KnowledgeBase kbase =
knowledgeBaseFactoryService<br>
.newKnowledgeBase(kbaseConf);<br>
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());<br>
<br>
KnowledgeAgentConfiguration
aconf =<br>
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();<br>
aconf.setProperty("drools.agent.scanDirectories",
"true");<br>
aconf.setProperty("drools.agent.scanResources",
"true");<br>
aconf.setProperty("drools.agent.newInstance",
"false");<br>
<br>
kagent =
KnowledgeAgentFactory.newKnowledgeAgent(
"CoreDroolsAgent",kbase,<br>
aconf);<br>
kagent.applyChangeSet(resource.newFileSystemResource(filePath));<br>
<br>
Thanks in advance!<br>
<br>
Cheers<br>
<font color="#888888">--<br>
View this message in context: <a
moz-do-not-send="true"
href="http://drools-java-rules-engine.46999.n3.nabble.com/KnowledgeAgent-and-OSGI-tp921989p921989.html"
target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/KnowledgeAgent-and-OSGI-tp921989p921989.html</a><br>
Sent from the Drools - User mailing list
archive at Nabble.com.<br>
</font>
<div>
<div>_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto: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>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
<br>
</div>
<pre><fieldset></fieldset>
_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<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>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
<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>
<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>