
|
If you were logged in you would be able to see more operations.
|
|
|
|
Time Tracking:
|
|
Original Estimate:
|
0.12d
|
|
|
Remaining Estimate:
|
0.12d
|
|
|
Time Spent:
|
Not Specified
|
|
|
|
|
The RetryTemplate cannot be configured in ItemOrientedTasklet: cannot set a backoffPolicy or interceptors, as it is private without getter/setter.
The easiest way is to simply provide a getter for RetryTemplate, so that we can configure it the following way:
<bean id="tasklet" class="ItemOrientedTasklet">
<property name="retryTemplate.backOffPolicy" ref="..." />
<property name="retryTemplate.interceptor" ref="..." />
</bean>
The more extensible approach would be to provide a setter too, in case we want to replace the retry template too, with the default being a simple RetryTemplate. Further, the instance type should be RetryOperations instead of RetryTemplate.
|
|
Description
|
The RetryTemplate cannot be configured in ItemOrientedTasklet: cannot set a backoffPolicy or interceptors, as it is private without getter/setter.
The easiest way is to simply provide a getter for RetryTemplate, so that we can configure it the following way:
<bean id="tasklet" class="ItemOrientedTasklet">
<property name="retryTemplate.backOffPolicy" ref="..." />
<property name="retryTemplate.interceptor" ref="..." />
</bean>
The more extensible approach would be to provide a setter too, in case we want to replace the retry template too, with the default being a simple RetryTemplate. Further, the instance type should be RetryOperations instead of RetryTemplate. |
Show » |
|
Lucas is in charge of making sure that the equivalent functionality survives to m5, so I'm assigning this to him (but probably it is going to be a "Won't Fix").
N.B. as a rule we never put getters in the public API. I actually like your example for its deviousness, but it breaks the rule of thumb we have across the whole Spring portfolio about encapsulation.