hi,

I was wondering if there is an elegant solution to the following problem

I have a JMS message listener set up to listen to the Queue
this all happens in the servlet that has load-on-startup attribute set to 1

the problem is that if the MQ server crashes and then is restarted - connections are 
lost and my listener is left hanging in the air

there is ExceptionListener that can be set to listen for asynchronous exceptions - so 
the solution could be to try to recconect to the queue and to start the listener again 
in the onException() method of ExceptionListener

the problem is now that the MQ server is not restarted immediatelly, but in a range of 
5-10 mins (even that is variable)

maybe I could set the while loop to catch exceptions or ping the MQ server (with sleep 
intervals) and only when the server responds to try to recconect and exit the 
onException() method  - but somehow I think that this is not the most elegant solution 
and the solution that is in the spirit of J2EE programming

TIA,

Darije

        _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
        Darije Ramljak
        Senior Software Engineer
        IP Platforms & Applications (ETK/D/B/I)
        New Products Department
        Research & Development Center

        Ericsson Nikola Tesla d.d.
        Krapinska 45, p.p. 93   Phone:  +385 1 365 3823
        HR-10002 Zagreb Fax:    +385 1 365 3610
        Croatia                                     Email:      
[EMAIL PROTECTED]

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to