-
1. Re: JMS onException not working
adrian.brock Dec 31, 2003 4:35 AM (in response to mkprim)How can onException be triggered if the client is dead?
If you mean you killed the network, an exception will be triggered when it
tries to ping the server (once every minute in the default configuration).
There is a read timeout parameter so that the server can detect the client
vanishing.
Regards,
Adrian -
2. Re: JMS onException not working
mkprim Jan 2, 2004 10:15 AM (in response to mkprim)Thanks for your reply. Now I understan how it works.
"There is a read timeout parameter so that the server can detect the client
vanishing. "
I have another question, then:
I kill my client but when the 60 seconds of detection complete, the server does not detect the client. Even if I leave it for some minutes...
So I reduced the PingPeriod to 200 and the ReadTimeout to 800. Whis this numbers it does work, but (I don't know why) I leave the client connected doing nothing, and it also detects the client disconnection, when the client is connected.
Do I need to implement my own ping message every xxxx miliseconds and send it as a JMS message?
Thanks,
Marcelo -
-
4. Re: JMS onException not working
adrian.brock Jan 6, 2004 7:07 AM (in response to mkprim)Why would it work with a read timeout of 800 millis-seconds but not 70 seconds?
You've got something strange going on.
Regards,
Adrian -
5. Re: JMS onException not working
mkprim Jan 6, 2004 8:22 AM (in response to mkprim)I didn't change anything in the client. Just changed the server configuration.
Maybe I've got to change the client ping and read timeout?
In the case, where (what files or properties)? -
6. Re: JMS onException not working
mkprim Jan 6, 2004 8:24 AM (in response to mkprim)I forgot to mention that I notice the disconnection using an onExceptionMessage on a class that implements the ExceptionListener interface, and is suscribed to the connection.
Thanks -
7. Re: JMS onException not working
adrian.brock Jan 6, 2004 3:43 PM (in response to mkprim)I don't understand the question.
The configuration is on the server. The client pings otherwise the server timesout.
Regards,
Adrian -
8. Re: JMS onException not working
mkprim Jan 6, 2004 4:18 PM (in response to mkprim)Understood.
Does it make sense that the server never respects the specified read timeout?
Do you have any single idea about what might be?
Thanks -
9. Re: JMS onException not working
mkprim Jan 7, 2004 12:32 PM (in response to mkprim)Please can anybody help me?
This is really urgent and I've been trying to solve it for three days.
Thanks. -
10. Re: JMS onException not working
adrian.brock Jan 7, 2004 2:17 PM (in response to mkprim)"adrian@jboss.org" wrote:
First, how do you know the server still thinks the client is connected?
Have you looked at debug/trace messages to see whether the server
is quietly detecting the failure?
If the read timeout is not working, it is a problem with your network,
tcp/ip stack or virtual machine. i.e. a bug
Didn't you mention it works with a small timeout but not with a large timeout?
Reards,
Adrian -
11. Re: JMS onException not working
mkprim Jan 7, 2004 2:27 PM (in response to mkprim)"mkprim" wrote:
>First, how do you know the server still thinks the client is connected?
>Have you looked at debug/trace messages to see whether the server
>is quietly detecting the failure?
I debugged the server using the JBossIDE in eclipse, looking the onException method. Its not called at all. Should I debug something else?
>If the read timeout is not working, it is a problem with your network,
>tcp/ip stack or virtual machine. i.e. a bug
>Didn't you mention it works with a small timeout but not with a large timeout?
It didn't work fine. I think the timeout was so small, that a connected client couldn't make it to send a ping, so the server "disconnected" it. Funny, with 600 ms it doesn't work either, that being fast enough.
Any other suggestions? Just don't know what to do. -
12. Re: JMS onException not working
mkprim Jan 9, 2004 9:07 AM (in response to mkprim)I've discovered that my JBoss at startup logs this message:
11:49:22,610 INFO [SnmpAgentService] Starting heartbeat controller ...
11:49:22,610 WARN [Heartbeat] Heartbeat disabled
Does this have anuthing to do with the client detection?
How can I fix this to enable the Heartbeat Service? -
13. Re: JMS onException not working
adrian.brock Jan 13, 2004 10:57 AM (in response to mkprim)"adrian@jboss.org" wrote:
You have completely confused me. I don't think you have read what I'm telling you.
onException is invoked when the client loses the connection to the server.
It is likely to be invoked when the client tries to ping the server and it fails.
The detection by the server of the client going away will not invoke onException on the
client.
How can it, it has lost the connection to the client.
One of your queries was about the client crashing. It cannot invoke onException
after a crash. The program is no more.
Regards,
Adrian -
14. Re: JMS onException not working
mkprim Jan 13, 2004 12:39 PM (in response to mkprim)"mkprim" wrote:
Ok.
First, I've read your posts.
Second, I have two onException methods:
1) In the client, to detect server crashes.
2) In the server, to detect client crashes or disconnection.
I Don't expect the server to invoke a client's onException (as you said the client has crashed!)
I Expect the server detecting a client crash in its own (server) onException.
Here are the steps I follow on the server.
1) Receive a TemporaryQueueConnection from the client
2) Get a reference to the connection and set an exceptionListener that is on the server.
3) Kill the client once it is connected
4) Expect the server to invoke its own onException.
Thats it.
I hope this is not bothering you.
Thanks,
Marcelo