I have a program read the data from queue and then run a stored proc to update the oracle DB(10g) This runs 24X7 and 360 days.
Also per day It process around 150,000 transactions.
Code work as follows.
connect to the queue (Websphere MQ)
connect to the data base (Oracle)
inside a lood it read the data from queue
and the run the stored proc to update the tables.
then it wait in the queue until it receive message
this is how it works.

There are 7 seven programs runnibg in the sun os. used nohup to submit the programs.

Some time all this 7 programs get hangs, when it try to sun the stored proc.

Is there any better way to change the program logic to avoid this senario( When we re-run it works properly. Al so this happen after running 4 to 5 days.)

Please help me.