Changeset 3269

Show
Ignore:
Timestamp:
01/12/09 08:49:34 (14 months ago)
Author:
jmoore
Message:

OmeroClustering : Fixing NPEs on early destroy()

(cherry picked from commit cf4827042bb1988a9839c389e5a667b8d83b1791)

Location:
trunk/components/blitz
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/components/blitz/src/ome/services/blitz/fire/Ring.java

    r3268 r3269  
    209209    public void destroy() { 
    210210        try { 
    211             this.clusterAdapter.deactivate(); 
     211            if (this.clusterAdapter != null) { 
     212                this.clusterAdapter.deactivate(); 
     213            } 
    212214            remove(MANAGERS + uuid); 
    213215            int count = jdbc.update("delete from session_ring where value = ?", uuid); 
     
    217219            log.error("Error stopping ring " + this, e); 
    218220        } finally { 
    219             cluster.down(this.uuid); 
     221            if (cluster != null) { 
     222                cluster.down(this.uuid); 
     223            } 
    220224        } 
    221225    } 
  • trunk/components/blitz/test/ome/services/blitz/test/ClusteredRingTest.java

    r3268 r3269  
    150150    @Test 
    151151    public void testIfRedirectIsDeletedAnotherHostTakesOver() throws Exception { 
    152         fails(); 
     152        fail(); 
    153153    } 
    154154} 

1.2.1-PRO © 2008-2009 agile42 all rights reserved (this page was served in: 0.511312 sec.)