This content has been marked as final.
Show 3 replies
-
1. Re: Testing if Connection is alive
clebert.suconic Apr 14, 2010 12:10 PM (in response to dansouza)Is this what you're looking for?
You can access the initial session through ((HornetQConnection)conn).getInitialSession()
Client Pinging will close the connection if for some reason the server is down.
-
2. Re: Testing if Connection is alive
timfox Apr 15, 2010 4:35 AM (in response to clebert.suconic)Or just create an ExceptionListener using the JMS API - this will get called if there is a problem with the connection, and just maintain a flag "alive" in your own application.
This is the proper, and portable way to do it with JMS.
-
3. Re: Testing if Connection is alive
dansouza Apr 15, 2010 7:32 AM (in response to timfox)Thanks Tim.
That´s the way I found to do it.
Regards,
Daniel