Esempio n. 1
0
        // Manage the failure, the Master alters the sucessors of this class
        internal static void manageFailedServer(string failed_url)
        {
            Console.WriteLine("INSIDE CATCH IN DATASTORE!!!");

            string sucessor_url;

            ILibraryComm master = (ILibraryComm)Activator.GetObject(
                typeof(ILibraryComm), Datastore.MASTER + "LibraryComm");

            sucessor_url = master.setFailedServer(failed_url);

            // Server failed
            if (sucessor_url == null)
            {
                Console.WriteLine("ERROR: THERE ARE NO SERVERS THAT HAVE THE REQUESTED PADINT");
            }
        }
Esempio n. 2
0
        // Returns the server url that has the requested UID objects (Sucessor)
        public static string manageFailedServer(string failed_url, int serverNumber)
        {
            string sucessor_url;

            ILibraryComm master = (ILibraryComm)Activator.GetObject(
                typeof(ILibraryComm), _master_url + "LibraryComm");

            sucessor_url = master.setFailedServer(failed_url);

            // Server failed
            if (sucessor_url == null)
            {
                Console.WriteLine("ERROR: THERE ARE NO SERVERS THAT HAVE THE REQUESTED PADINT");
                _transaction.State = TransactionState.ABORTED;
            }
            Servers.AvailableServers[serverNumber] = sucessor_url;
            return(sucessor_url);
        }