You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Wayne Johnson <wd...@yahoo.com> on 2007/05/04 16:26:27 UTC

Telling when a client disconnects

I have an Axis WSDD service that needs to tell if and when a client disconnects, so that we can clean up session information.  I can't simply rely on a logoff method getting called, because the disconnect might be based on external factors, like loss of network, etc.

We also appear to have a problem with the client timing out.  Is there a way to detect when this happens before we try to send the next packet?  Or of preventing timeouts?

Thanks.




--- 
Wayne Johnson,                         | There are two kinds of people: Those 
3943 Penn Ave. N.          | who say to God, "Thy will be done," 
Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
(612) 522-7003                         | then,  have it your way." --C.S. Lewis

 
---------------------------------
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.

Re: Telling when a client disconnects

Posted by Martin Gainty <mg...@hotmail.com>.
Hi Wayne

you can setTimeOutInMilliSeconds for client.options e.g.

  stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(60*1000);
http://spteam-lists.blogspot.com/2007/04/re-how-to-increase-time-out-of-axis2.html

HTH/
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

  ----- Original Message ----- 
  From: Wayne Johnson 
  To: Axis 
  Sent: Friday, May 04, 2007 10:26 AM
  Subject: Telling when a client disconnects


  I have an Axis WSDD service that needs to tell if and when a client disconnects, so that we can clean up session information.  I can't simply rely on a logoff method getting called, because the disconnect might be based on external factors, like loss of network, etc.

  We also appear to have a problem with the client timing out.  Is there a way to detect when this happens before we try to send the next packet?  Or of preventing timeouts?

  Thanks.




  --- 
  Wayne Johnson,             | There are two kinds of people: Those 
  3943 Penn Ave. N.          | who say to God, "Thy will be done," 
  Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
  (612) 522-7003             | then, have it your way." --C.S. Lewis



------------------------------------------------------------------------------
  Finding fabulous fares is fun.
  Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.

Re: Telling when a client disconnects

Posted by Wayne Johnson <wd...@yahoo.com>.
OK, it looks like if my SoapBindingSkeleton is an implementation of ServiceLifecycle then JavaProvider.java will call a destroy() method when a session is ended.

My question: Is there a way to cause wsdl2java (et al) to create
my skeleton with this interface without resorting to manually changing the code whenever we regen the skeleton?  

Is there a better way to do this?  Is there a way to register a AxisHTTPSessionListener so I can get notified?

Wayne Johnson <wd...@yahoo.com> wrote: I have an Axis WSDD service that needs to tell if and when a client disconnects, so that we can clean up session information.  I can't simply rely on a logoff method getting called, because the disconnect might be based on external factors, like loss of network, etc.

We also appear to have a problem with the client timing out.  Is there a way to detect when this happens before we try to send the next packet?  Or of preventing timeouts?

Thanks.




--- 
Wayne Johnson,                         | There are two kinds of people: Those 
3943 Penn Ave. N.          | who  say to God, "Thy will be done," 
Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
(612) 522-7003                         | then,  have it your way." --C.S. Lewis
   

---------------------------------
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.


--- 
Wayne Johnson,                         | There are two kinds of people: Those 
3943 Penn Ave. N.          | who say to God, "Thy will be done," 
Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
(612) 522-7003                         | then,  have it your way." --C.S. Lewis

 
---------------------------------
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.