Hi... Can we use Java Threads in a struts web application as we do in a stand Alone application. As all the control would be under Web/Application Server , it is efficient/allowable to induce threads in a struts web application . Please Suggest.
Which struts version you were using?
What do you want to do with threads / why do you need it actually?
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
hi Mohan and Joe..thanks for your suggestions. Sorry i was not able to get back here after posting. My requirement was to send a request to data base after some update is done depending on a condition.Client wants this to be independent. He wants to proceed to other links without depending on this operation result or time . I thought of using threads,but i didnt get any assured/suitable information whether i can use threads or any other alternatives. My application is struts based and we are using JBOSS server.Please suggest.
One strategy I've used is to use a JMS queue to communicate with a stand-alone process. The request just has to place all the required information on the queue. The JMS queue is useful because it can queue up requests should the stand-alone process fail at any time. The stand-alone process reads from the queue, executes whatever processing it has to do then it sends an email with the report as an attachment.
subject: Thread programming in a Struts application