Thanks for clarification. One of the EJB constitutes a JMS transaction which will timeout after 4 minutes. so we made the global transaction time out on server to 5mins to take care of that.Let me know if you have any ideas on this too..
JMS is meant for aynchronous messaging. The synchronous receive() method blocks until a message is produced, the timeout value, if specified, elapses or the application is closed. I strongly recommend that you avoid using blocking receive() calls on the server side because a synchronous receive() call consumes resources for the entire duration that the call is blocked.
Also, consider the effect on the client which might be waiting for up to five minutes for a response.
See if you can redesign your app for asyncronous messaging. Doing it this way, when methods are received asynchronously, the application is notified using a message listener only when a message has been produced. So, no resources are consumed waiting for a message.