[jboss-user] [JBoss Messaging] - Re: JBoss Messaging client app fails to reconnect after rest

pgervais do-not-reply at jboss.com
Mon Apr 16 17:31:34 EDT 2007


After further investigation, it seems that the problem is due to a cleanup problem with the org.jboss.remoting.InvokerRegistry. The client invoker and server invoker from the previously created connection are not cleaned when the close method fails. I modified my code to clean this up manually 
using the following code before trying to recreate a connection:

  |          ServerInvoker[] serverInvokers = InvokerRegistry.getServerInvokers();
  |          for (ServerInvoker invoker : serverInvokers)
  |          {
  |             invoker.stop();
  |             invoker.destroy();
  |             InvokerRegistry.destroyServerInvoker(invoker);
  |          }
  |          ClientInvoker[] clientInvokers = InvokerRegistry.getClientInvokers();
  |          for (ClientInvoker invoker : clientInvokers)
  |          {
  |             InvokerRegistry.destroyClientInvoker(invoker.getLocator(),  null);
  |          }
  | 
and the connection could be created without stopping my application, this also took care of the WorkerThread that I mentionned in my previous post.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037747#4037747

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037747



More information about the jboss-user mailing list