incubator-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [PATCH][Agila] support for setting properties on Nodes in a DI style
Date Tue, 30 Nov 2004 10:58:32 GMT
Attached is a patch which adds Spring-style dependency injection to the 
configuration of Nodes/Tasks in the Agila XML using a <property> 


             <node id="3" type="activity" 
display_name="Leave Application">
                 <property name="foo" value="hello"/>
                 <property name="bar">123</property>

                     <actor name="Self"/>
                     <binding name="numdays" type="el" datatype="String" 
value="numdays" input="true" output="true"/>
                     <binding name="reason" type="el" datatype="String" 
value="reason" input="true" output="true"/>

Currently only primitive type properties are supported.

Later on we could add a 'ref' attribute as an alternative to 'value', 
like Spring, to allow a full dependency injection container like 
Spring, Pico, HiveMind or even GBeans to be used to lookup some named 
object to be set as a property on a task. e.g. if a Task has to do some 
JDBC / email / JMS operations - we should use a real DI container for 
configuring those services and just refer to them from inside the Agila 


<!--- look  up some DataSource in the current ResolverService instance 
which could be Spring / JNDI / JMX etc -->
<property name="dataSource" ref="myCustomerDatabase"/>

But for now, the use of primitive types should be enough.

View raw message