Information Technology Reference
In-Depth Information
import javax.jms.∗;
import jshell.∗;
import jshell.commandline.∗;
service JShell {
protocol : rest {
options {
servers = "http://localhost" ;
serverPort = 61616;
serverThreads = 5;
}
pointcut String JShell.process_command_line(String) {}
}
}
Figure 6.11.
JShell REST protocol DDL file.
6.4 Recovery Evaluation
As discussed in Section 5.3, RemoteJ supports four recovery scenarios, the abort ,
continue and nextServer statements as well as a user-defined recovery routine.
The abort statement terminates the application in the event of an error while
the continue statement simply ignores the error. Due to their simplicity, we do
not consider these statements in our evaluation and instead concentrate on the
nextServer statement and user-defined recovery routines.
6.4.1
Automatic Recovery
The nextServer statement simply cycles through a list of servers either declared in
the DDL's servers statement or via the remotej.servers property. This allows
for a simple recovery scenario where services are run on a number of machines in
a network and in the event of a failure the client automatically reconnects to the
next server in the list as illustrated in Figure 6.13.
If no servers can be contacted the application will be terminated as this is
considered an unrecoverable error. If a server is successfully contacted following a
previous failure, then knowledge of previous failures are discarded thereby allowing
for the possibility that unavailable servers may become available.
For our evaluation we used the client code in Figure 6.14 and the associated
DDL in Figure 6.15 to generate an RMI client and associated server. As can be
seen in the client code, the test application simply calls the server repeatedly in a
loop to obtain the current date. Although this is a simplistic example it adequately
demonstrates the nextServer recovery capability.
Search WWH ::




Custom Search