|
Hi all,
i'm implementing a system with many clients and a server. This clients receives messages thought JMS. I'm trying that if I disconnect the net cable and
after a while i reconnect the cable i was able to receipt the
messages.
I have a Thread that checks the connection state
and reconnects the subscribers.
The problem its that the socket beetween the server and my client it�s yet stablished now, when i
want to re-establish the connection, jboss tells me that this client its
allready connected to the server:
[INFO,UILServerILService] Client request
resulted in a server exception:
javax.jms.JMSSecurityException: The login id has an assigned client id. That client id is already connected to the server! at org.jboss.mq.server.StateManager.checkUser(StateManager.java:195) at org.jboss.mq.server.JMSServer.checkUser(JMSServer.java:540) at org.jboss.mq.il.uil.UILServerILService.run(UILServerILService.java:286) at java.lang.Thread.run(Thread.java:479) In the client side, the log is: An exception(JMSException) occured: org.jboss.mq.SpyJMSException: Cannot get a client ID org.jboss.mq.SpyJMSException: Cannot get a client ID at org.jboss.mq.Connection.askForAnID(Connection.java:488) at org.jboss.mq.Connection.<init>(Connection.java:118) at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:47) at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:76) at com.ips.mainoutlet.messages.LocalACKMessageSubscriber.<init>(LocalACKMessageSubscriber.java:92) at com.ips.mainoutlet.messages.DataBaseUpdater.start(DataBaseUpdater.java:77) at com.ips.mainoutlet.tpv.application.proto_main_outlet.Frame1.setConnected(Frame1.java:2098) at com.ips.mainoutlet.bbdd_api.threadConexion.run(threadConexion.java:79) linked exception is: javax.jms.JMSSecurityException: The login id has an assigned client id. That client id is already connected to the server! linked exception is: javax.jms.JMSSecurityException: The login id has an assigned client id. That client id is already connected to the server! this exception occurs in the line: topicConnection=topicFactory.createTopicConnection(strIdTienda,strIdTienda); when i'm trying to reconnect. In other case, if i close my application, the
sockets were closed, and if after an hour i want to reconnect, the messages are
well receipt.
How can I disconnect a subscriber?
How can i break manually break the socket
?
Any idea will be wellcomed.
thanks a lot and sorry for my English, Sergio. |
