Information Technology Reference
In-Depth Information
recovery remoteError (RemoteException e) {
System.out.println( "Exception: " + e.getMessage());
System.out.println( "Host : " + transfer.getCurrentHost());
System.out.println( "Failed method call : " + transfer.getMethod());
}
Figure 4.1.
Recovery statement example.
4.3.6
Protocol Statements
The protocol statement is used to define the protocol to be used, the protocol
options, the classes and associated methods to be altered to use the protocol and
the recovery strategy to be used.
ProtocolStatement ::= protocol Identifier Colon LeftCurley
Options (PointcutStatement)+ RightCurley
There may be any number of protocol statements and there may be more
than one protocol statement for the same protocol. Each protocol statement
must contain a single option statement and one or more pointcut statements.
4.3.7
Options Statements
As can be expected, different protocols may have different protocol options and
these options are stipulated in the options statement contained in the protocol
statement.
As there may be more than one protocol in a single application (or perhaps
the same protocol with different options, for example), any number of protocol
and associated option statements may be declared. Option statements are simple
name/value pairs using the following syntax:
Options
::= (Identifier = Identifier)+
Identifier
::= ('a'..'z' | 'A'..'Z')+ (IntegerLiteral)*
IntegerLiteral
::= 0..255
Options and protocols are not part of the DDL language as such. Instead, the
RemoteJ parser/generator accepts any string for the protocol and any name/value
pairs for the options and defers protocol and protocol option checking to plug in
protocol adapters .
This allows additional protocols to be added without changes needing to be
made to the RemoteJ parser. We describe this process in full in Section 5.2.
4.3.8
Pointcut Statements
The pointcut statement contains the class and associated methods that are to
become distributed using the protocol stipulated in the protocol statement. In
Search WWH ::




Custom Search