[rules-dev] Feedback on Drools - Spring / what can I do to help?

Paul Browne paulb at firstpartners.net
Wed Jan 23 12:34:37 EST 2008


I'll bite, although most likely I'm missing something obvious here

Code sample itself is clear enough (and builds cleanly with maven), and 
I *think* I can see the intention from the various Spring aspects and 
config files (although I'm not sure of the purpose of the aspects. .... 
yet!)

Looking at the example (DroolsTest.java) what I see is the Drools 
classes being loaded pretty much as normal (no Spring)

What I expected to see in the sample was:
1) Test gets a handle to the Spring config file
2) Spring auto-configuring the beans based on the contents of this file..
3) A call (via a bean that we've obtained from the Spring Context) which 
causes the Rule engine to fire
4) A 2nd config file showing how to configure Spring transactions / 
proxy etc

What can I do to help? Given that this isn't in SVN yet , what's the 
best way to manage the code?

Paul


Mark Proctor wrote:
> -------- Original Message --------
>
> You can declare the transaction beans as follows:
> <bean id="droolsTransactionManager"
> class="org.drools.spring.core.DroolsTransactionManager">
>    <property name="workingMemory" ref="workingMemory"/>
> </bean>
>
> <bean id="txProxyTemplate" abstract="true"
> class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> 
>
>    <property name="proxyTargetClass">
>        <value>true</value>
>    </property>
>    <property name="transactionManager" ref="droolsTransactionManager"/>
>        <property name="transactionAttributes">
>     <props>
>            <prop key="newStatefullSession*">PROPAGATION_REQUIRED</prop>
>     </props>
>    </property>
> </bean>
>
> The last one is only a proxy for the transaction, to declare the 
> pointcuts.
> I think the classes for aspects in Ales implementation can be
> implemented this way for spring, if not it will be needed to look at :
> http://static.springframework.org/spring/docs/2.5.x/reference/aop.html
> but I need time for that.
>
> The DroolsTransactionManager is for standalone use.
>
> It was added rule base configuration support for the bean factory of
> Geoffrey as well to set the type.
>
> Here are information about getting Resources like URL, input stream, 
> file...
> http://static.springframework.org/spring/docs/2.5.x/reference/resources.html 
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20080123/36088a69/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: paulb.vcf
Type: text/x-vcard
Size: 282 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-dev/attachments/20080123/36088a69/attachment.vcf 


More information about the rules-dev mailing list