<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">i’m open to allowing mixing and matching of annotations and xml configuration. Although what’s published on the qzr sort of goes against the grain of what we are trying to achieve - such as not specifying individual asset files.<div><pre style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Courier, monospace; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><div class="line" id="LC22" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd" style="box-sizing: border-box; font-weight: bold;">public</span> <span class="n" style="box-sizing: border-box;">KieServicesBean</span> <span class="nf" style="box-sizing: border-box; color: rgb(153, 0, 0); font-weight: bold;">kieServices</span><span class="o" style="box-sizing: border-box; font-weight: bold;">()</span> <span class="kd" style="box-sizing: border-box; font-weight: bold;">throws</span> <span class="n" style="box-sizing: border-box;">KieBuildException</span> <span class="o" style="box-sizing: border-box; font-weight: bold;">{</span></div><div class="line" id="LC23" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n" style="box-sizing: border-box;">DroolsResource</span><span class="o" style="box-sizing: border-box; font-weight: bold;">[]</span> <span class="n" style="box-sizing: border-box;">resources</span> <span class="o" style="box-sizing: border-box; font-weight: bold;">=</span> <span class="k" style="box-sizing: border-box; font-weight: bold;">new</span> <span class="n" style="box-sizing: border-box;">DroolsResource</span><span class="o" style="box-sizing: border-box; font-weight: bold;">[]{</span> </div><div class="line" id="LC24" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k" style="box-sizing: border-box; font-weight: bold;">new</span> <span class="nf" style="box-sizing: border-box; color: rgb(153, 0, 0); font-weight: bold;">DroolsResource</span><span class="o" style="box-sizing: border-box; font-weight: bold;">(</span><span class="s" style="box-sizing: border-box; color: rgb(221, 17, 68);">"rules/health-quiz.drl"</span><span class="o" style="box-sizing: border-box; font-weight: bold;">,</span> </div><div class="line" id="LC25" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n" style="box-sizing: border-box;">ResourcePathType</span><span class="o" style="box-sizing: border-box; font-weight: bold;">.</span><span class="na" style="box-sizing: border-box; color: teal;">CLASSPATH</span><span class="o" style="box-sizing: border-box; font-weight: bold;">,</span> </div><div class="line" id="LC26" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n" style="box-sizing: border-box;">ResourceType</span><span class="o" style="box-sizing: border-box; font-weight: bold;">.</span><span class="na" style="box-sizing: border-box; color: teal;">DRL</span><span class="o" style="box-sizing: border-box; font-weight: bold;">)};</span></div><div class="line" id="LC27" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class="line" id="LC28" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n" style="box-sizing: border-box;">KieServicesBean</span> <span class="n" style="box-sizing: border-box;">bean</span> <span class="o" style="box-sizing: border-box; font-weight: bold;">=</span> <span class="k" style="box-sizing: border-box; font-weight: bold;">new</span> <span class="n" style="box-sizing: border-box;">DefaultKieServicesBean</span><span class="o" style="box-sizing: border-box; font-weight: bold;">(</span><span class="n" style="box-sizing: border-box;">resources</span><span class="o" style="box-sizing: border-box; font-weight: bold;">);</span></div><div class="line" id="LC29" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k" style="box-sizing: border-box; font-weight: bold;">return</span> <span class="n" style="box-sizing: border-box;">bean</span><span class="o" style="box-sizing: border-box; font-weight: bold;">;</span></div><div class="line" id="LC30" style="box-sizing: border-box; padding-left: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="o" style="box-sizing: border-box; font-weight: bold;">}</span></div></pre><div><br></div><div>While you can do anything from programmatic factories, and you don’t “lose” any functionality, in it’s current form it doesn’t promote convention and configuration approach. I really want to avoid any method code, other than configuring say listeners. Ideally we’d be looking for something like below, that mirrors what we have in the xml already, and avoids &nbsp;authoring any methods at all. I know I could do this in CDI, but I don’t know about Spring. In CDI I can scan for usages of @KBaseConfig. Where I find a @KBaseConfig I can populate the main CDI beans infrastructure, so it treats xml configuration and annotation configuration the same.</div><div><br></div><div><br></div><div>@KBaseConfig(name=“kbase1”, packages=“my.domain.fld, my.domain.fld2" )</div><div>public static class kbase1Config {</div><div><br></div><div>&nbsp; &nbsp; @KSessionConfig(name=“ksession1”, clockType=“pseudo”)&nbsp;</div><div>&nbsp; &nbsp; private KieSession kieSession1;</div><div><br></div><div><div>&nbsp; &nbsp; @KSessionConfig(name=“ksession2”, clockType=“realtime”)&nbsp;</div><div>&nbsp; &nbsp; private KieSession kieSession2;</div></div><div>}</div><div><br></div><div>The above is the same as:</div><div>&lt;kbase name==“kbase1”, &nbsp;packages=“my.domain.fld, my.domain.fld2”&gt;</div><div>&nbsp; &nbsp; &lt;ksession name=“ksession1” clockType=“pseudo” /&gt;</div><div>&nbsp; &nbsp; &lt;ksession name=“ksession1” clockType=“realtime” /&gt;</div><div>&lt;/kbase&gt;</div><div><br></div><div>Mark</div><div><br></div><div><div><div>On 1 Mar 2014, at 23:29, Stephen Masters &lt;<a href="mailto:stephen.masters@me.com">stephen.masters@me.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">It definitely wouldn’t miss out on any Drools 6 functionality. It enables you to use everything that is available in 6.x because it give you direct access to the API.<br><br>Steve<br><br><br>On 28 Feb 2014, at 19:41, vinodkiran &lt;<a href="mailto:vinodkiran@usa.net">vinodkiran@usa.net</a>&gt; wrote:<br><br><blockquote type="cite">Steve,<br><br>Interesting approach. I am looking through your code. <br><br>It seems to me that using the JavaConfig approach would miss some of the<br>changes introduced in Drools 6.0. <br><br>Look at this article by Mark, <br><br><a href="http://blog.athico.com/2013/10/configuration-and-convention-based.html">http://blog.athico.com/2013/10/configuration-and-convention-based.html</a><br><br><br><br>-- Vinod<br><br><br><br><br><br>--<br>View this message in context: http://drools.46999.n3.nabble.com/Kie-sprind-xsd-Are-the-configuration-options-limited-compare-to-drools-spring-xsd-tp4028383p4028431.html<br>Sent from the Drools: User forum mailing list archive at Nabble.com.<br>_______________________________________________<br>rules-users mailing list<br>rules-users@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote><br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></div></body></html>