5 Replies Latest reply: Oct 3, 2012 12:40 PM by Justin Bertram RSS

Reconnect to remote JMS / TopicConnection after reoboot As7

Sueleyman Vurucu Expert

I have a fat swing client which invokes EJB's over JNDI and get feedback from server over JMS. If I restart the when the client is running then the recconection to JMS won't work. I get allway the Exception below.



javax.naming.NamingException: Failed to lookup [Root exception is org.jboss.remoting3.NotOpenException: Writes closed]

    at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)
    at org.jboss.naming.remote.protocol.v1.Protocol$1.execute(Protocol.java:104)
    at org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1.lookup(RemoteNamingStoreV1.java:79)
    at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:79)
    at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:83)
    at javax.naming.InitialContext.lookup(InitialContext.java:411)
    at com.siemag.test.remote.ServiceLocatorAbstract.getTopicConnectionFactory(ServiceLocatorAbstract.java:229)
    at com.siemag.test.remote.ServiceLocatorAbstract.getTopicConnection(ServiceLocatorAbstract.java:274)
    at com.siemag.test.remote.App$1.run(App.java:30)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.jboss.remoting3.NotOpenException: Writes closed
    at org.jboss.remoting3.remote.RemoteConnectionChannel.openOutboundMessage(RemoteConnectionChannel.java:107)
    at org.jboss.remoting3.remote.RemoteConnectionChannel.writeMessage(RemoteConnectionChannel.java:296)
    at org.jboss.naming.remote.protocol.v1.WriteUtil.write(WriteUtil.java:59)
    at org.jboss.naming.remote.protocol.v1.Protocol$1.execute(Protocol.java:76)
    ... 8 more


I attach a test project based on maven.


Thanks in advance