2 Replies Latest reply on Jan 19, 2004 9:36 AM by jochen

    catch Client OIL/OIL2 disconnected Exception (SocketExceptio

    huzzi

      Hi there,

      I've got some problems with catching exceptions caused by disconnected JMS Clients:
      When I start my Client, it starts a Connection to a Queue on the server (3.2.2) and keeps it until the Client shutdown.
      So when I disconnect the remote Clientmashine physically (pulling the net-cable or press the power button) when running Client application, the Server just throws:

      1. - using OIL2
      [OIL2ServerILService] Client Disconnected: java.net.SocketException: Connection reset

      2. - using OIL

      11:25:46,635 WARN [OILServerILService] Connection failure (1).
      java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:168)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
      at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java
      :2133)
      at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(Object
      InputStream.java:2316)
      at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStre
      am.java:2383)
      at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream
      .java:2455)
      at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputSt
      ream.java:2604)
      at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.
      java:205)
      at java.lang.Thread.run(Thread.java:536)

      But when the connection fails I need to remove a stateful session bean and clean up some stuff at the server. How ?

      If I set the Exceptionlistener on the Connection, the onException Method ist just called on Clientside.

      Is there a solution for this problem ?


      By the way: What's the diffrence betweent OIL and OIL2 ?


      thanks al lot for help

      moritz