public @interface RMIDefaultOnFailure
If a remote method call fails due to RMI runtime failures, the default implementation of the method will be called.
Only interface with default implementation can be annotated with this class.
If a remote method call fails due to any RMI error, i.e. an subclass of RMIRuntimeException is thrown, then the default implementation for the interface method will be called.
Note: If the method implementation explicitly throws an exception then the default implementation will not be called.
I.e. if a method issues a throw
statement then the thrown exception will be propagated to the caller
over the connection instead of calling the default implementation.
If the default implementation throws an exception, the causing RMIRuntimeException instance will be added as suppressed to it.
From: Annotation |