Hi Oleg,
perfect. Thanks!!
And also thanks a lot for your webinar last week. Looking forward for the next one.
If there is anybody interested, here my new configuration:
Code:
<int:gateway service-interface="de.firstdata.ewas.integration.IThreadTestGateway"
default-request-channel="input" />
<int:channel id="input" >
<int:queue capacity="100"/>
</int:channel>
<int:delayer default-delay="1000" input-channel="input" >
<int:poller max-messages-per-poll="10" task-executor="executor">
<int:interval-trigger interval="10" time-unit="MILLISECONDS"/>
</int:poller>
</int:delayer>
<task:executor id="executor" pool-size="100" queue-capacity="100"/>
And of course a different call in the source code:
Code:
final ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:threadTest.xml");
final IThreadTestGateway gw = ctx.getBean(IThreadTestGateway.class);
final List<Future<String>> resultList = new ArrayList<Future<String>>();
for (int i = 0; i < 100; i++) {
final Future<String> result = gw.test("testme"+i);
resultList.add(result);
}
for (final Future<String> future : resultList) {
try {
System.out.println(future.get(2000, TimeUnit.SECONDS));
} catch (final Exception e) {
e.printStackTrace();
}
}
Joachim