public class

RemoteAccessException

extends NestedRuntimeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ org.springframework.core.NestedRuntimeException
           ↳ org.springframework.remoting.RemoteAccessException
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Generic remote access exception. A service proxy for any remoting protocol should throw this exception or subclasses of it, in order to transparently expose a plain Java business interface.

When using conforming proxies, switching the actual remoting protocol e.g. from Hessian to Burlap does not affect client code. Clients work with a plain natural Java business interface that the service exposes. A client object simply receives an implementation for the interface that it needs via a bean reference, like it does for a local bean as well.

A client may catch RemoteAccessException if it wants to, but as remote access errors are typically unrecoverable, it will probably let such exceptions propagate to a higher level that handles them generically. In this case, the client code doesn't show any signs of being involved in remote access, as there aren't any remoting-specific dependencies.

Even when switching from a remote service proxy to a local implementation of the same interface, this amounts to just a matter of configuration. Obviously, the client code should be somewhat aware that it might be working against a remote service, for example in terms of repeated method calls that cause unnecessary roundtrips etc. However, it doesn't have to be aware whether it is actually working against a remote service or a local implementation, or with which remoting protocol it is working under the hood.

Summary

Public Constructors
RemoteAccessException(String msg)
Constructor for RemoteAccessException.
RemoteAccessException(String msg, Throwable cause)
Constructor for RemoteAccessException.
[Expand]
Inherited Methods
From class org.springframework.core.NestedRuntimeException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public RemoteAccessException (String msg)

Constructor for RemoteAccessException.

Parameters
msg the detail message

public RemoteAccessException (String msg, Throwable cause)

Constructor for RemoteAccessException.

Parameters
msg the detail message
cause the root cause (usually from using an underlying remoting API such as RMI)