logo       


CVS update of hedera/src/org/continuent/hedera/appia (1 file): msg#00010

Subject: CVS update of hedera/src/org/continuent/hedera/appia (1 file)
    Date: Wednesday, September 6, 2006 @ 16:44:29
  Author: nunomrc
    Path: /cvsroot/hedera/hedera/src/org/continuent/hedera/appia

Modified: HederaSupportSession.java (1.10 -> 1.11)

Fixed HEDERA-17.


---------------------------+
 HederaSupportSession.java |   43 ++++++++++++++++++++++++++++++++++---------
 1 files changed, 34 insertions(+), 9 deletions(-)


Index: hedera/src/org/continuent/hedera/appia/HederaSupportSession.java
diff -u hedera/src/org/continuent/hedera/appia/HederaSupportSession.java:1.10 
hedera/src/org/continuent/hedera/appia/HederaSupportSession.java:1.11
--- hedera/src/org/continuent/hedera/appia/HederaSupportSession.java:1.10       
Wed Sep  6 12:40:34 2006
+++ hedera/src/org/continuent/hedera/appia/HederaSupportSession.java    Wed Sep 
 6 16:44:29 2006
@@ -79,7 +79,7 @@
   private InetSocketAddress     myAddress              = null;
   private Group            myGroup                = null;
   private boolean          requestedConnect       = false,
-      socketAvailable = false;
+      socketAvailable = false, requestedDisconnect = false;
   private ViewState        vs                     = null;
   private LocalState       ls                     = null;
   private Channel          channel                = null;
@@ -289,13 +289,22 @@
    */
   private void handleHederaDisconnect()
   {
-    try
+    if(isBlocked)
     {
-      (new LeaveEvent(channel, Direction.DOWN, this, myGroup, vs.id)).go();
+      // disconnect was requested, but the view is changing.
+      // silent disconnection will only be done when the new view is delivered.
+      requestedDisconnect = true;
     }
-    catch (AppiaEventException e)
+    else
     {
-      e.printStackTrace();
+      try
+      {
+        (new LeaveEvent(channel, Direction.DOWN, this, myGroup, vs.id)).go();
+      }
+      catch (AppiaEventException e)
+      {
+        e.printStackTrace();
+      }
     }
   }
 
@@ -415,10 +424,26 @@
         e1.printStackTrace();
       }
     }
-    myAddress = vs.addresses[ls.my_rank];
-    appiaGMS.setLocalAddress(myAddress);
-    // TODO: send a clone of the event?
-    appiaGMS.addToMailbox(e);
+    
+    if(requestedDisconnect)
+    {
+      try
+      {
+        (new LeaveEvent(channel, Direction.DOWN, this, myGroup, vs.id)).go();
+        requestedDisconnect = false;
+      }
+      catch (AppiaEventException ex)
+      {
+        ex.printStackTrace();
+      }      
+    }
+    else
+    {
+      myAddress = vs.addresses[ls.my_rank];
+      appiaGMS.setLocalAddress(myAddress);
+      // TODO: send a clone of the event?
+      appiaGMS.addToMailbox(e);
+    }
   }
 
   /*


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe