Hi all !I'd need to access Spring beans from a Java Service Task. I have tried with field injection:public class SpringServiceTask implements JavaDelegate {
private DataSource ds;
public void setDataSource(DataSource ds) {
this.ds= ds;
}
public void execute(DelegateExecution execution) throws Exception {
System.out.println("DataSource "+ds); // NULL!
}
}However the injection does not happens and this the execute method prints null.Even if I've added the datasource reference in the applicationContext.xml, nothing is injected:<bean id="reviewApproved" class="com.sample.ReviewApproved">
<property name="ds" ref="dataSource"/>
</bean>
Any help ?Thanks a lotFrank