Download GLADE User's Guide

Transcript
Chapter 2: The Distributed Systems Annex
19
2.7.1 Variables and Non-Remote Access Types
In RT or RCI package declarations, variable declarations are forbidden, and non-remote
access types are allowed as long as their marshaling subprograms are explicitly provided
(see hundefinedi [Transmitting Dynamic Structure], page hundefinedi)..
2.7.2 RPC Failures
Calls are executed at most once: they are made exactly one time or they fail with
an exception. When a communication error occurs, System.RPC.Communication Error is
raised.
2.7.3 Exceptions
Any exception raised in a remote method or subprogram call is propagated back to the
caller. Exceptions semantics are preserved in the regular Ada way.
package Internal is
Exc : exception;
end Internal;
package RemPkg2 is
pragma Remote_Call_Interface;
procedure Subprogram;
end RemPkg2;
package RemPkg1 is
pragma Remote_Call_Interface;
procedure Subprogram;
end RemPkg1;
Let us say that RemPkg2, Internal and RemExcMain packages are on the same partition
Partition 1 and that RemPkg1 is on partition Partition 2.
with RemPkg1, Ada.Exceptions; use Ada.Exceptions;
package body RemPkg2 is
procedure Subprogram is
begin
RemPkg1.Subprogram;
exception when E : others =>
Raise_Exception (Exception_Identity (E), Exception_Message (E));
end Subprogram;
end RemPkg2;