I use Spring, ActiveMQ, Struts 2, jboss and Oracle.

A message is written to the queue when a request is submitted and on the receiving end, a program reads data from the database based on the parameters in the queue and creates a flat file. When a lot of data is read and processed, it takes a long time (say up to 15 minutes) to complete the file creation process, and I get a "broken pipe" exception.

What can I do to fix this?

Thanks.
Ganesh.