public void onChange(TopologyChangeEvent event)
   {
      try
      {
         if (rpcService.isCoordinator())
         {
            final WorkspaceContainerFacade wsContainer = reposistory.getWorkspaceContainer(wsEntry.getName());

            if (wsContainer.getState() == ManageableRepository.SUSPENDED)
            {
               new Thread()
               {
                  @Override
                  public void run()
                  {
                     try
                     {
                        List<Object> results =
                           rpcService.executeCommandOnAllNodes(requestForResponsibleForResuming, true);
                        for (Object result : results)
                        {
                           if (!(result instanceof Throwable) && (Boolean)result)
                           {
                              return;
                           }
                        }

                        wsContainer.setState(ManageableRepository.ONLINE);
                     }
                     catch (SecurityException e)
                     {
                        LOG.error("You haven't privileges to execute remote command", e);
                     }
                     catch (RepositoryException e)
                     {
                        LOG.error("Can't resume workspace", e);
                     }
                     catch (RPCException e)
                     {
                        LOG.error("Can't resume workspace", e);
                     }
                  }
               }.start();
            }
         }
      }
      catch (RPCException e)
      {
         LOG.error("Exception during command execution", e);
      }
   }
public void onChange ( TopologyChangeEvent event ) { try { if ( rpcService . isCoordinator ( ) ) { final WorkspaceContainerFacade wsContainer = reposistory . getWorkspaceContainer ( wsEntry . getName ( ) ) ; if ( wsContainer . getState ( ) == ManageableRepository . SUSPENDED ) { new Thread ( ) { @ Override public void run ( ) { try { List < Object > results = rpcService . executeCommandOnAllNodes ( requestForResponsibleForResuming , true ) ; for ( Object result : results ) { if ( ! ( result instanceof Throwable ) && ( Boolean ) result ) { return ; } } wsContainer . setState ( ManageableRepository . ONLINE ) ; } catch ( SecurityException e ) { LOG . error ( "You haven't privileges to execute remote command" , e ) ; } catch ( RepositoryException e ) { LOG . error ( "Can't resume workspace" , e ) ; } catch ( RPCException e ) { LOG . error ( "Can't resume workspace" , e ) ; } } } . start ( ) ; } } } catch ( RPCException e ) { LOG . error ( "Exception during command execution" , e ) ; } }
{@inheritDoc}