[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] Annoying Warning about recv failed



okay, I did some testing on my webservice. What I found out is really bizarre. Basically, I stripped the webservice down to a simple
connect as in the following code:

I_XmlBlasterAccess con = null;
Global glob = null;         

try {
  glob = new Global();

  con = glob.getXmlBlasterAccess();
  
  ConnectQos qos = new ConnectQos(glob);
  qos.setSessionName(new SessionName(glob, "test_publisher"));

  System.out.println ("Connecting");
  con.connect(qos, null);

} catch (XmlBlasterException e) {
} finally {
  System.out.println ("Disconnecting");

  try { Thread.sleep(1000); } catch (InterruptedException e) {}

  if (con != null) {
    if (con.isConnected()) 
       con.disconnect(new DisconnectQos(glob));
  }
}

In the finally section, I upped the sleep time to 5000 instead of 1000 so I could tell when the disconnect would happen and when the recv-failed message appeared. It looks like the recv-failed message appears on disconnect. So to confirm this, I commented out the disconnect and the message doesn't appear after the client quits. I did this a few times to confirm.

I then added another Thread.sleep command of 5 seconds right after the disconnect so I could confirm that it was the disconnect command causing this warning. After looking at the blaster console I was able to count 5 seconds, then the recv-failed message appears, then counted another 5 seconds, and my client program resumes from it's call to the webservice.

Is there anyway I coded the disconnect call wrong?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com