An interceptor is a software mechanism that provides the hooks that are nee
ded to introduce additional code dynamically into the execution path of an
application. By exploiting interceptors, developers can enhance and potenti
ally modify the behavior of an application at runtime without having to rev
ise or recompile the application code. We have identified three distinct in
terception points for the Java Remote Method Invocation (JavaRMI) model, at
the proxy level, the transport level and the shared library level of the J
avaRMI model. The interceptors implemented at these interception points emp
loy the DynamicProxy API, the RMISocketFactory API, and a library mediation
approach, respectively. Our interceptor implementations are novel in that
they are transparent to the application, add nominal latency overheads and
are easy to deploy, requiring only minimal modifications to the application
. We describe how the interceptors can be exploited to introduce additional
services (such as logging and profiling mechanisms) to the JavaRMI runtime
. In particular, we describe the use of interceptors in the Aroma System to
enhance the existing JavaRMI model with support for fault-tolerance throug
h the consistent replication of JavaRMI objects. Copyright (C) 2001 John Wi
ley & Sons, Ltd.