On Thu, Aug 26, 2010 at 4:48 PM, Andrew Waterman-2 [via Drools - Java
<br>Rules Engine] &lt;<a href="/user/SendEmail.jtp?type=node&node=1362284&i=0" target="_top" rel="nofollow">[hidden email]</a>&gt; wrote:
<br>&gt;
<br>&gt; Okay, cool. So where's the magic location? :)
<br><br>The magic location...is...unless I'm missing something...specified in ra.xml.
<br><br>Here's what that part of ra.xml looks like (lines 39-43 from
<br><a href="http://code.google.com/p/drools-jca/source/browse/trunk/drools-rar/src/main/resources/META-INF/ra.xml):" target="_top" rel="nofollow" link="external">http://code.google.com/p/drools-jca/source/browse/trunk/drools-rar/src/main/resources/META-INF/ra.xml):</a><br><br>&lt;config-property&gt;
<br>  &lt;config-property-name&gt;changeSetResourceName&lt;/config-property-name&gt;
<br>  &lt;config-property-type&gt;java.lang.String&lt;/config-property-type&gt;
<br>  &lt;config-property-value&gt;rules/KnowledgeBases.xml&lt;/config-property-value&gt;
<br>&lt;!-- this can be any classpath resource you want --&gt;
<br>&lt;/config-property&gt;
<br><br>So in this example somewhere in the resource adapter's classpath
<br>(which in my case is usually in a jar file in the lib directory of an
<br>.ear file that houses the .rar file), you should have
<br>rules/KnowledgeBases.xml.  This can be named anything you want;
<br>there's nothing special about the name.
<br><br>That file, as I posted before, is your changeset, and following the
<br>XSD that I didn't write :-) looks like this:
<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
<br>&lt;change-set xmlns=&quot;<a href="http://drools.org/drools-5.0/change-set" target="_top" rel="nofollow" link="external">http://drools.org/drools-5.0/change-set</a>&quot;
<br>xmlns:xs=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_top" rel="nofollow" link="external">http://www.w3.org/2001/XMLSchema-instance</a>&quot;
<br>xs:schemaLocation=&quot;<a href="http://drools.org/drools-5.0/change-set" target="_top" rel="nofollow" link="external">http://drools.org/drools-5.0/change-set</a><br><a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/tags/5.0.1.26597.FINAL/drools-api/src/main/resources/change-set.xsd" target="_top" rel="nofollow" link="external">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/tags/5.0.1.26597.FINAL/drools-api/src/main/resources/change-set.xsd</a>&quot;&gt;
<br>  &lt;add&gt;
<br>    &lt;resource source=&quot;classpath:rules/rules.drl&quot; type=&quot;DRL&quot;&gt;&lt;/resource&gt;
<br>  &lt;/add&gt;
<br>&lt;/change-set&gt;
<br><br>The &lt;resource source=&quot;&quot;/&gt; part is up to you and has to be a URL. &nbsp;One
<br>of the allowed URL protocols I discovered is classpath:, so that's
<br>what I used in my stuff. &nbsp;You could use file:, ftp:, http:, whatever;
<br>the URL could (and probably should) point to a Guvnor package as well.
<br>&nbsp;Then you have the added benefit that if that package ever changes,
<br>the KnowledgeAgent will automatically pick it up.
<br><br>I hope that helps.
<br><br>Best,
<br>Laird
<br>
<br><hr align="left" width="300">
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-and-Java-EE-tp1323225p1362284.html">Re: Drools and Java EE</a><br>
Sent from the <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-User-f47000.html">Drools - User mailing list archive</a> at Nabble.com.<br>