2 Replies Latest reply on Feb 20, 2004 4:18 AM by jochen

    handle client crash

    jochen Newbie

      we have an application running on jboss_3.2.0 that must capture and handle a crash of a client. is there any possibility to catch this? as in jbossmq-service.xml you can configure a ping period, there server must now about a client crash, but how can i get an ejb to know about such an event?

        • 1. Re: handle client crash

          In practice, it is impossible to differentiate a client crash from a network failure.

          You need to establish some kind of a heart beat between the client and the server. If the beat stops you know that something is wrong: whether it's a client crash, network failure, or just a busy client is a whole another issue. You know that the client can't communicate for whatever reason.

          In general, the EJB component model doesn't support client callbacks so you'd have to do this with MBeans.

          • 2. Re: handle client crash
            jochen Newbie

            I think that for our purpose it is sufficient to know that the connection to the client is lost, it's not necessary to know about the reason for the problem. Since for several connection layers in jbossmq-service.xml a ping period can be configured, I suppose there must be a way to notify my EJB about a problem, perhaps via the connection layer itself, isn't it? As a workaround we wrote an explicit "ping" with JMS, so if the client doesn't respond to the ping-message we know the connection or the client is down. But that isn't a very sophisticated way, e.g. as the JBoss seems to already ping the client.

            Any advice is welcome.