I have a question concerning on how to deal with threads...
Situation: a webbapplication (Struts-Spring). The business layer consists of spring beans and struts is used for the front-end handling. The webApp is deployed on an application server (Weblogic), which takes care of all the threading issues if I'm not mistaken.
At one time in the application there is a call to a webservice, and since this may take a while I have created an 'in progress page' which keeps refreshing until the result has been retrieved.
I have created a spring bean which implements Runnable :
implementation of Runnable :
This is called from a Struts action as follows :
here's a fragment of the applicationContext :
This works fine but I don't like the following line
I've also heard that it is not proper to work with threads in a managed application server like weblogic. So I think I might run into concurrency issues when many clients are calling the webservice. And I'm not sure if it's proper to let a Spring bean implement Runnable ?
I've done some searching on the forum and somebody suggested to work with the ThreadPoolTaskExecutor, but Isn't this more related for 'tasks'. And I don't think this is possible in a 1.4 JDK environment, is this correct ?
Any information is welcome !
[ November 28, 2006: Message edited by: Kristof Camelbeke ] [ November 28, 2006: Message edited by: Kristof Camelbeke ]