Information Technology Reference
In-Depth Information
import java.rmi.∗;
import clock.∗;
service ClockService {
protocol :rmi{
options {
registryName = "RMITestServer" ;
registryHost = "localhost" ;
registryPort = 1099;
runEmbeddedRegistry = true;
servers = "localhost,bookworm,bookpro" ;
}
pointcut Date ClockDate.getDate () {
recovery = nextServer;
}
}
}
Figure 6.15.
RMI ClockService DDL for recovery testing.
After terminating the third server, the client reconnected to the first server
again. We then terminated the first server which caused the application to abort
with an error indicating that no servers were available thereby verifying correct
operation of the nextServer statement.
Through this evaluation we were able to determine that a simple round-
robin type of recovery routine could be correctly implemented in the DDL for all
protocols, thereby removing the recovery concern from the client code and greatly
simplifying the development of this type of recovery.
6.4.2
User-Defined Recovery Routines
The nextServer statement above provides useful recovery functionality for a class
of applications running on a cluster of known hosts . While this may be sucient
for a large number of application types, it cannot be used in the scenario where
servers, some of which are unknown at the time the application is started, leave
and join the network over extended periods of time.
Although we could support this scenario in the RemoteJ code generator, with
an associated DDL statement, we have chosen to implement it using a user-defined
recovery routine so that we may evaluate the functionality and extendibility of
RemoteJ's recovery system.
Search WWH ::




Custom Search