[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1434) Drools Spring
Pablo Nussembaum (JIRA)
jira-events at lists.jboss.org
Mon Nov 30 15:47:29 EST 2009
[ https://jira.jboss.org/jira/browse/JBRULES-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12497317#action_12497317 ]
Pablo Nussembaum commented on JBRULES-1434:
-------------------------------------------
We've been working on developing a more spring like integration. The XML below shows how to create a ksession using ServiceManager implementation ServiceManagerLocalClient. As you can see the kbase is created using the service manager reference, and the ksession instance is created from the kbase. If you need the kseesion to be registered in the service manager it is done by injecting the SM in the ksession bean.
As regard the drools namespace, we think that this is notation is compact enough and spring users would feel it natural.
Example XML:
<bean id="sm1" class="org.drools.vsm.local.ServiceManagerLocalClient"/>
<bean id="kbase1" class="org.drools.container.spring.KnowledgeBaseBeanFactory"
p:serviceManager-ref="sm1">
<property name="resources">
<list>
<bean class="org.drools.container.spring.DroolsResourceAdapter"
p:resource="classpath:rules/test.drl" p:resourceType="DRL"/>
<bean class="org.drools.container.spring.DroolsResourceAdapter"
p:resource="classpath:rules/decisionTable.xls" p:resourceType="DTABLE">
<property name="resourceConfiguration">
<bean class="org.drools.builder.impl.DecisionTableConfigurationImpl"
p:inputType="XLS" p:worksheetName="Tables_2"/>
</property>
</bean>
</list>
</property>
</bean>
<!-- if property "serviceManager" is set the ksession will be registered in it. -->
<bean id="ksession1" class="org.drools.container.spring.StatefulKnowledgeSessionBeanFactory"
p:serviceManager-ref="sm1" p:kbase-ref="kbase1"/>
> Drools Spring
> -------------
>
> Key: JBRULES-1434
> URL: https://jira.jboss.org/jira/browse/JBRULES-1434
> Project: Drools
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: All
> Reporter: Mark Proctor
> Assignee: Mauricio Salatino
> Fix For: 5.1.0.M2
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list