<div>Hi,</div><div><br></div><div>I think the xml looks good.&nbsp;</div><div>Spring&#39;s PropertyEditors -&nbsp;<a href="http://static.springframework.org/spring/docs/2.5.x/reference/validation.html#beans-beans-conversion">http://static.springframework.org/spring/docs/2.5.x/reference/validation.html#beans-beans-conversion</a>&nbsp;could be used to even further simplify it. Using convention over configuration to guess the resource type from file&#39;s extension. The configuration will then become:</div>
<div><br></div><div>&lt;bean id=&quot;rb1&quot; class=&quot;org.drools.ioc.spring.KnowledgeBaseFactoryBean&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;resources&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;list&gt;<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;value&gt;<a>file:src/main/java/org/drools/ioc/spring/testSpring.drl&lt;/value&gt;</a></div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;value&gt;<a></a><a>file:src/main/java/org/drools/ioc/spring/IntegrationExampleTest.xls</a>&lt;/value&gt;<br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/list&gt;<br></div><div><div class="Ih2E3d">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
</div>&lt;/bean&gt;<br></div><div><br></div><div>I am not that familiar with PropertyEditors to know if this is possible to do or not. I am just throwing it out here, maybe somebody else will know better. It is not that important just nice to have..<br>
</div><div><br></div><div>Best Regards,</div><div>Michal</div><div><br></div><div><br></div><div class="gmail_quote">On Tue, Nov 25, 2008 at 6:07 AM, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  

<div bgcolor="#ffffff" text="#000000">
This is now what the spring XML looks like:<br>
&nbsp; &lt;bean id=&quot;rb1&quot;
class=&quot;org.drools.ioc.spring.KnowledgeBaseFactoryBean&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;resources&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;list&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bean
class=&quot;org.drools.ioc.spring.KnowledgeResourceFactoryBean&quot;&gt;<div class="Ih2E3d"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;knowledgeType&quot; value=&quot;DRL&quot; /&gt;<br></div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;source&quot;
value=<a>&quot;file:src/main/java/org/drools/ioc/spring/testSpring.drl&quot;</a>
/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/bean&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bean
class=&quot;org.drools.ioc.spring.KnowledgeResourceFactoryBean&quot;&gt;<div class="Ih2E3d"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;knowledgeType&quot; value=&quot;DTABLE&quot; /&gt;<br></div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;source&quot;
value=<a>&quot;file:src/main/java/org/drools/ioc/spring/IntegrationExampleTest.xls&quot;</a>
/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property
name=&quot;knowledgeResourceConfiguration&quot;&gt;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;bean
class=&quot;org.drools.ioc.spring.DTableResourceConfigurationFactoryBean&quot;&gt;
<br><div class="Ih2E3d">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name=&quot;inputType&quot; value=&quot;XLS&quot;
/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;/bean&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/bean&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/list&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br></div>
&nbsp; &lt;/bean&gt;<br>
<br>
How is that looking? Most people happy with that, it&#39;s very generic.
I&#39;ve dropped the agent side for the moment, just focusing on scripting
of a KnowledgeBase via spring. It now more closely follows the
KnowedgeBuilder api.&nbsp; The above spring configuration will return a
rulebase of two resources, on is a simple DRL, the other is a
decisiontable of type XLS.<br>
<br>
I&#39;ll extend this further to make sure that ALL knowledge types can be
built for a knowledge base via the spring api. I&#39;ll also make sure it
can take a KnowledgeBaseConfiguration and
KnowledgeBuilderConfiguration. Then I&#39;ll also make sure there is a
spring configuration to return a stateful or stateless session given a
knowlebasefactorybean ref. Finally I might add some basic agent
facilities.<br>
<br>
I think this should give spring users everything they need, i.e. the
capability to build knowledge bases and wire sessions and knowledge
bases to other beans - all via xml.<br>
<br>
Mark<br><font color="#888888">
<br>
Mark Proctor wrote:
</font><blockquote type="cite"><div><div></div><div class="Wj3C7c">
  
I&#39;m updating drools-api as we speak, based on the spring Resource idea.
the following Factory will provide a set of ready to go Resources, that
should satisfy most people&#39;s needs. So drools-api will be spimplied to<br>
kbuilder.addResource( Resource, KnowledgeType )<br>
kbuilder.addResource( Resource, KnowledgeType, ResourceConfiguration )<br>
  <br>
And the Resources available, and ofcourse people can implement the
interface themselves is:<br>
  <pre><span>public</span> <span>class </span>ResourceFactory {
&nbsp;
    <span>public</span> <span>static</span> Resource newURLResource(URL url) {
        <span>return</span> null;
    }
&nbsp;
    <span>public</span> <span>static</span> Resource newURLResource(URI uri) {
        <span>return</span> null;
    }
&nbsp;
    <span>public</span> <span>static</span> Resource newURLResource(String url) {
        <span>return</span> null;
    }    
&nbsp;
    <span>public</span> <span>static</span> Resource newFileResource(File file) {
        <span>return</span> null;
    }
&nbsp;
    <span>public</span> <span>static</span> Resource newFileResource(String file) {
        <span>return</span> null;
    }
&nbsp;
&nbsp;
    <span>public</span> <span>static</span> Resource newByteArrayResource(<span>byte</span>[] bytes) {
        <span>return</span> null;
    }
&nbsp;
    <span>public</span> <span>static</span> Resource newInputStreamResource(InputStream stream) {
        <span>return</span> null;
    }
&nbsp;
    <span>public</span> <span>static</span> Resource newReaderResource(Reader reader) {
        <span>return</span> null;
    }
&nbsp;
    <span>public</span> <span>static</span> Resource newReaderResource(Reader reader, String encoding) {
        <span>return</span> null;
    }  
&nbsp;
    <span>public</span> <span>static</span> Resource newClassPathResource(String path) {
        <span>return</span> null;
    }
&nbsp;
    <span>public</span> <span>static</span> Resource newClassPathResource(String path, ClassLoader classLoader) {
        <span>return</span> null;
    }    

}

It can take a Reader, which underneath will open an InputStream, it&#39;ll use default encoding unless the encoding is
specified as otherwise in the alternative param. 

So typically it&#39;ll be
kbuilder.addResource( ResourceFactory.newClassPathResource( &quot;some path&quot; ), KnowledgeType.DRL );

don&#39;t forget you can import static methods, so it can actually be:
kbuilder.addResource( newClassPathResource( &quot;some path&quot; ), KnowledgeType.DRL );


Mark
  </pre>
  <br>
  <br>
  <br>
Greg Barton wrote:
  <blockquote type="cite">
    <pre>Well, if you look at String.getBytes() it uses the default encoding, then ISO-8859-1 if that fails. (Default is UTF-8 unless otherwise specified in the &quot;file.encoding&quot; property.) As long as that&#39;s documented I guess it&#39;s not a problem, unless someone wants to specify their own charset for a particular file.  Java 1.6 has String.getBytes(Charset) and that could allow someone to use an alternate charset.

I figure for the vast majority of cases it won&#39;t be a problem.

--- On Sun, 11/23/08, Mark Proctor <a href="mailto:mproctor@codehaus.org" target="_blank">&lt;mproctor@codehaus.org&gt;</a> wrote:

  </pre>
    <blockquote type="cite">
      <pre>From: Mark Proctor <a href="mailto:mproctor@codehaus.org" target="_blank">&lt;mproctor@codehaus.org&gt;</a>
Subject: Re: [rules-dev] Spring support for drools-api
To: &quot;Rules Dev List&quot; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">&lt;rules-dev@lists.jboss.org&gt;</a>
Date: Sunday, November 23, 2008, 9:09 PM
I&#39;m thinking of adopting the Spring approach to
Resources for 
drools-api, obviously not tieing drools-api to spring -
just copying the 
concept. Resource however doesn&#39;t seem to work with
Readers. Readers in 
general are only needed for in memory generation , using
StringReader, 
otherwise file/url/classpath resources suffice. So it seems
to do the 
Spring way you would do a ByteArrayResource( &quot;this is
my drl 
file&quot;.getBytes() ). I&#39;m wondering what people
think of that, and what 
about encoding issues? Compared to the way at the moment
that we just 
take a Reader, and that&#39;s it.

Mark

Mark Proctor wrote:
    </pre>
      <blockquote type="cite">
        <pre>now my spring skills are improving, I&#39;m looking to
      </pre>
      </blockquote>
      <pre>improve the xml and 
    </pre>
      <blockquote type="cite">
        <pre>leverage spring Resource framework - so that we can
      </pre>
      </blockquote>
      <pre>get complete 
    </pre>
      <blockquote type="cite">
        <pre>scripting of the entire KnowlegeBuilder api. I&#39;ve
      </pre>
      </blockquote>
      <pre>come up with the two 
    </pre>
      <blockquote type="cite">
        <pre>xmls so far:
     &lt;property name=&quot;drls&quot;&gt;
         &lt;list&gt;
             

      </pre>
      </blockquote>
      <pre>&lt;value&gt;<a>file:src/main/java/org/drools/ioc/spring/testSpring.drl</a>&lt;/value&gt;
    </pre>
      <blockquote type="cite">
        <pre>         &lt;/list&gt;       &lt;/property&gt;   
     &lt;property name=&quot;dtables&quot;&gt;
         &lt;list&gt;
                 &lt;bean 

      </pre>
      </blockquote>
      <pre>class=&quot;org.drools.ioc.spring.DtableResourceFactoryBean&quot;&gt;
    </pre>
      <blockquote type="cite">
        <pre>                     &lt;property
      </pre>
      </blockquote>
      <pre>name=&quot;resource&quot; 
    </pre>
      <pre>value=<a>&quot;file:src/main/java/org/drools/ioc/spring/dt.xls&quot;</a>
/&gt;
    </pre>
      <blockquote type="cite">
        <pre>                     &lt;property
      </pre>
      </blockquote>
      <pre>name=&quot;inputType&quot; value=&quot;XLS&quot; /&gt;
    </pre>
      <blockquote type="cite">
        <pre>                 
&lt;/bean&gt;                                         
      </pre>
      </blockquote>
      <pre>                   
    </pre>
      <blockquote type="cite">
        <pre>&lt;/list&gt;       &lt;/property&gt;
This one has a property per knowledge type, the
      </pre>
      </blockquote>
      <pre>advantage is on 
    </pre>
      <blockquote type="cite">
        <pre>knowledge types which are just string, we can use a
      </pre>
      </blockquote>
      <pre>simple &lt;value&gt;. 
    </pre>
      <blockquote type="cite">
        <pre>Although knowlege tyep that require additional
      </pre>
      </blockquote>
      <pre>information, like the 
    </pre>
      <blockquote type="cite">
        <pre>DT input type, will need a bean.

     &lt;property name=&quot;resources&quot;&gt;
         &lt;list&gt;
             &lt;bean 

      </pre>
      </blockquote>
      <pre>class=&quot;org.drools.ioc.spring.KnowledgeResourceBeanFactory&quot;&gt;
    </pre>
      <blockquote type="cite">
        <pre>                 &lt;property
      </pre>
      </blockquote>
      <pre>name=&quot;knowledgeType&quot; value=&quot;DRL&quot; /&gt;
    </pre>
      <blockquote type="cite">
        <pre>                 &lt;property
      </pre>
      </blockquote>
      <pre>name=&quot;resource&quot; 
    </pre>
      <pre>value=<a>&quot;file:src/main/java/org/drools/ioc/spring/testSpring.drl&quot;</a>

    </pre>
      <blockquote type="cite">
        <pre>/&gt;                              &lt;/bean&gt;

             &lt;bean 

      </pre>
      </blockquote>
      <pre>class=&quot;org.drools.ioc.spring.KnowledgeResourceBeanFactory&quot;&gt;
    </pre>
      <blockquote type="cite">
        <pre>                 &lt;property
      </pre>
      </blockquote>
      <pre>name=&quot;knowledgeType&quot; value=&quot;DTABLE&quot;
/&gt;
    </pre>
      <blockquote type="cite">
        <pre>                 &lt;property
      </pre>
      </blockquote>
      <pre>name=&quot;resource&quot; 
    </pre>
      <pre>value=<a>&quot;file:src/main/java/org/drools/ioc/spring/dt.xls&quot;</a>
/&gt;
    </pre>
      <blockquote type="cite">
        <pre>                 &lt;property
      </pre>
      </blockquote>
      <pre>name=&quot;resourceConfiguration&quot;&gt;   
    </pre>
      <blockquote type="cite">
        <pre>                     &lt;bean 

      </pre>
      </blockquote>
      <pre>class=&quot;org.drools.ioc.spring.DtableResourceFactoryBean&quot;&gt;
    </pre>
      <blockquote type="cite">
        <pre>                         &lt;property
      </pre>
      </blockquote>
      <pre>name=&quot;inputType&quot; value=&quot;XLS&quot; /&gt;
    </pre>
      <blockquote type="cite">
        <pre>                     &lt;/bean&gt;                 
      </pre>
      </blockquote>
      <pre>&lt;/property&gt;
    </pre>
      <blockquote type="cite">
        <pre>             &lt;/bean&gt;                            
      </pre>
      </blockquote>
      <pre> &lt;/list&gt;
    </pre>
      <blockquote type="cite">
        <pre>     &lt;/property&gt;
This approach more closely resembles the kbuilder api.
      </pre>
      </blockquote>
      <pre>We have  simple 
    </pre>
      <blockquote type="cite">
        <pre>resources list. Everything is a bean, so it&#39;s very
      </pre>
      </blockquote>
      <pre>flexible, but we 
    </pre>
      <blockquote type="cite">
        <pre>lose the shortcut approach of the first one where we
      </pre>
      </blockquote>
      <pre>can just give a 
    </pre>
      <blockquote type="cite">
        <pre>list of strings. As each one must be a bean, so that
      </pre>
      </blockquote>
      <pre>it can contain 
    </pre>
      <blockquote type="cite">
        <pre>atleast the knowledge type, as well as the resource
      </pre>
      </blockquote>
      <pre>string.
    </pre>
      <blockquote type="cite">
        <pre>My preference currently is for the second one, as I
      </pre>
      </blockquote>
      <pre>don&#39;t tink it&#39;s 
    </pre>
      <blockquote type="cite">
        <pre>too verbose, and it provides better consistency than
      </pre>
      </blockquote>
      <pre>the first.
    </pre>
      <blockquote type="cite">
        <pre>Mark


Geoffrey De Smet wrote:
      </pre>
        <blockquote type="cite">
          <pre>It doesn&#39;t indeed sound overkill to me to
        </pre>
        </blockquote>
      </blockquote>
      <pre>create a FactoryBean for 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>the Builder.
Though I would probably reuse the Builder inside
        </pre>
        </blockquote>
      </blockquote>
      <pre>the 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>KnowlegdeBaseFactory to build the Knowlegde base.

The real issue is concurrency.
Spring promotes the idea of stateless beans which
        </pre>
        </blockquote>
      </blockquote>
      <pre>do have global 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>variables, but those global variables are either
        </pre>
        </blockquote>
      </blockquote>
      <pre>synchronised 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>thread-safe or also follow the stateless bean
        </pre>
        </blockquote>
      </blockquote>
      <pre>pattern.
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>This in fact makes the stateless beans thread
        </pre>
        </blockquote>
      </blockquote>
      <pre>safe, without any need 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>for synchronization/locking.

So the question is: is your KnowlegdeBase
        </pre>
        </blockquote>
      </blockquote>
      <pre>thread-safe?
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>Thread safe objects are usually put into global
        </pre>
        </blockquote>
      </blockquote>
      <pre>variables,
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>while not thread unsafe objects are always put
        </pre>
        </blockquote>
      </blockquote>
      <pre>into local variables.
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>class A {
  private B b; // thread-safe by synchronization
        </pre>
        </blockquote>
      </blockquote>
      <pre>(JDBCConnection, ...)
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>  private C c; // thread-safe by the stateless
        </pre>
        </blockquote>
      </blockquote>
      <pre>pattern:
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>  // both b and c are set during initialization
        </pre>
        </blockquote>
      </blockquote>
      <pre>(constr. or setter), 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>before A is exposed to other threads

  public void metho(D d) { // d is not thread-safe
    E e = ...; // e is not thread-safe
  }

}

In drools 4. B is the RuleBase, while E is the
        </pre>
        </blockquote>
      </blockquote>
      <pre>working memory instance.
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>With kind regards,
Geoffrey De Smet


Mark Proctor schreef:
        </pre>
          <blockquote type="cite">
            <pre>Geoffrey De Smet wrote:
          </pre>
            <blockquote type="cite">
              <pre>With kind regards,
Geoffrey De Smet


Mark Proctor schreef:

            </pre>
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>I&#39;d also maybe consider
                </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>dropping the Spring prefix, as it&#39;s in a 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <blockquote type="cite">
                  <pre>package called spring?
=&gt;
                </pre>
                </blockquote>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>org.drools.spring.KnowledgeAgentFactoryBean
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>My worry here is it might be a
              </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>duplicate of the same name used in 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>the future - although it&#39;ll be in
              </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>a different package namespace, 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <blockquote type="cite">
                <pre>it&#39;s still not good practice.
              </pre>
              </blockquote>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>Anyone else have any opinions on this?
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>Good point, prefixing it with Spring
            </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>can&#39;t hurt :)
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>I&#39;m just wondering about
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>KnowledgeBuilderFactory and 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>KnowledgeBaseFactory. While it makes sense to
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>put the 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>KnowledgeAgentFactory into spring, does it
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>make sense for those 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>other factories? What are they gonna do other
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>than return 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>KnowledgeBuilder or a KnowledgeBase, only
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>possible advantage is that 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>it would allow spring to inject the
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>KnowledgeBuilderConfiguration 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>and KnowledgeBaseConfiguration. And ideas?

          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre><a href="http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilderFactory.java" target="_blank">http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilderFactory.java</a>

    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre><a href="http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilder.java" target="_blank">http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/java/org/drools/builder/KnowledgeBuilder.java</a>

    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre><a href="http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/java/org/drools/KnowledgeBaseFactory.java" target="_blank">http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/java/org/drools/KnowledgeBaseFactory.java</a>

    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre><a href="http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/java/org/drools/KnowledgeBase.java" target="_blank">http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-api/src/main/java/org/drools/KnowledgeBase.java</a>

    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>This is typically how those two factories are
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>used:
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.addResource( new URL(
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre><a>&quot;file://myrules.drl&quot;</a> ),
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>                                 
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>KnowledgeType.DRL);
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>KnowledgeBase kbase =
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>KnowledgeBaseFactory.newKnowledgeBase();
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>If we use spring to automate the adding of
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>resources, that&#39;s pretty 
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>much what the agent is doing anyway, so
          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>wouldn&#39;t that be pointless?
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>Mark


          </pre>
            <blockquote type="cite">
              <pre>            </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>_______________________________________________
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>

            </pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre><a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre>            </pre>
            </blockquote>
            <pre>          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre>_______________________________________________
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre>rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>

          </pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre><a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
    </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre>_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>


        </pre>
        </blockquote>
        <pre>_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>


      </pre>
      </blockquote>
      <pre>_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
    </pre>
    </blockquote>
    <pre>      
_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>


  </pre>
  </blockquote>
  <br>
  </div></div><pre><hr size="4" width="90%"><div class="Ih2E3d">_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
  </div></pre>
</blockquote>
<br>
</div>

<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>