This content has been marked as final.
Show 3 replies
-
1. Re: client cannot reconnect after server restart
elmizmo Apr 8, 2005 8:48 AM (in response to elmizmo)Ok found it !
I looks like I had to close the Initialcontext first.
Works nicely now.
cya
Henk -
2. Re: client cannot reconnect after server restart
manishsingh May 10, 2005 4:17 PM (in response to elmizmo)would u mind sending a code snippet. I tried the closing the initial context but no success.
-
3. Re: client cannot reconnect after server restart
elmizmo May 11, 2005 2:37 AM (in response to elmizmo)Here's what I do when I encounter an exception via the onException(JMSException) method :
if (jndiContext != null) { try { logger.debug("Closing JNDI InitialContext."); jndiContext.close(); } catch (NamingException e) { // TODO Auto-generated catch block e.printStackTrace(); } } if (session != null) { try { logger.debug("Closing JMS Session."); session.close(); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } } if (connection != null) { try { logger.debug("Closing JMS Connection ..."); connection.close(); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
after that, I try to reconnect after a few minutes.
Hope this helps ?
Henk