[Spread-users] Socket Exception when daemon dies. Cannot re-connect to Spread.

Renee Mathur Renee.Mathur at wnco.com
Wed Jul 29 14:34:21 EDT 2009


In my application, I do a disconnect before trying to reconnect too.

But as I said in explanation earlier, it doesn't clean up the leftover
state ("connected" variable on the SpreadConnection class in JavaAPI
wrapper of Spread).

 

 

Thank you.

 

Regards,

Renee Mathur.

Contractor,

Framework Support, Technology Department,

Southwest Airlines.

Ph: (W) 214.792.4644

Email: renee.mathur at wnco.com

Website: www.southwest.com

________________________________

From: spread-users-bounces at lists.spread.org
[mailto:spread-users-bounces at lists.spread.org] On Behalf Of Dave
Koberstein
Sent: Monday, July 27, 2009 3:36 PM
To: spread-users at lists.spread.org
Subject: Re: [Spread-users] Socket Exception when daemon dies. Cannot
re-connect to Spread.

 

We issue a disconnect before reconnect.  It seems to me that throws an
exception since the socket is closed but in effect cleans up any
leftover state regarding the connection.

On 7/27/2009 12:46 PM, Renee Mathur wrote: 

Hi.

I have an application that performs like a Replicated Cache and uses
Spread 4.0 for messaging.

I have multiple instances of my application and multiple spread daemons
in the environment.

 

In my application I have a receive thread, that receives messages from
Spread.

I have code where, if I get a socket exception on the receive thread
(the daemon has died or unable to connect to the daemon),

I do a disconnect and then, I try to connect to other daemons that may
be running.

 

But, once my application gets a Socket exception, when I try to
re-connect, I get an "Already Connected" SpreadException from Spread.

Looking through the Spread source code (SpreadConnection.java), I found,
if the receive gets an exception, it does not set the "connected"
Boolean to false.

Subsequent disconnect invoked by my application fails too, (since it
tries to send a Spread Message which would fail since the Socket has
been closed from the daemon), which throws another SpreadException, but
does not set connected to false. 

Subsequent connect invoked by my application, checks the connected
variable, and throws a SpreadException saying its "Already Connected".

 

I checked the source code for 3.17, 4.0 and 4.1, and the logic has not
changed in any of the versions.

 

Are there any work arounds for this situation? How can my application
connect to a different daemon once its been disconnected?

Any help/insight much appreciated!

 

 

Thank you.

 

Regards,

Renee Mathur.

Contractor,

Framework Support, Technology Department,

Southwest Airlines.

Ph: (W) 214.792.4644

Email: renee.mathur at wnco.com

Website: www.southwest.com

 

________________________________

******* CONFIDENTIALITY NOTICE *******


This e-mail message and all attachments transmitted with it may contain
legally privileged and confidential information intended solely for the
use of the addressee. If the reader of this message is not the intended
recipient, you are hereby notified that any reading, dissemination,
distribution, copying, or other use of this message or its attachments
is strictly prohibited. If you have received this message in error,
please notify the sender immediately and delete this message from your
system. Thank you. 

 



________________________________



 
_______________________________________________
Spread-users mailing list
Spread-users at lists.spread.org
http://lists.spread.org/mailman/listinfo/spread-users
  

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20090729/617d8d87/attachment.html 


More information about the Spread-users mailing list