Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::exceptions::ClientServerExceptionExample Class Reference

List of all members.

Public Member Functions

void throwOriginalAcsJACSErrTest0Ex () throws AcsJACSErrTest0Ex
void throwACSErrTest0Ex () throws ACSErrTest0Ex
void throwWrapperAcsJACSErrTest0Ex (boolean extractErrorTraceAutomatically) throws AcsJACSErrTest0Ex
void throwConvertedAcsJACSErrTest0Ex () throws AcsJACSErrTest0Ex

Detailed Description

This class provides methods that are typical of a distributed computing scenario, where exceptions can be thrown locally inside the server implementation, caught, sent back to the calling client over the remote communication protocol, and then processed by the client.

Author:
hsommer created 25.04.2006 21:29:20


Member Function Documentation

void alma::acs::exceptions::ClientServerExceptionExample::throwACSErrTest0Ex  )  throws ACSErrTest0Ex [inline]
 

This method can be seen as an example for a CORBA/remote method, such as the implementation of a method from a Java component's interface for which in IDL the exception ACSErrTest0Ex is declared.

The AcsJ-style exception is converted to its CORBA-equivalent, but no new exception is added to the chain (ErrorTrace).

Exceptions:
ACSErrTest0Ex always, internally converted from AcsJACSErrTest0Ex
See also:
throwOriginalAcsJACSErrTest0Ex()

void alma::acs::exceptions::ClientServerExceptionExample::throwConvertedAcsJACSErrTest0Ex  )  throws AcsJACSErrTest0Ex [inline]
 

Represents an implementation method of some client application that calls a remote method, here throwACSErrTest0Ex().

The AcsJACSErrTest0Ex that will be thrown by this "client" method is caused by an exception in the "remote" method. That remote exception is in general not the VM original, but has been converted from an ACSErrTest0Ex/ErrorTrace which is the format the exception took on to travel over the CORBA wire.

Once caught on the client side, the remote exception is converted to an AcsJACSErrTest0Ex exception which does not have an independent text message. Thus unlike in method throwWrapperAcsJACSErrTest0Ex(boolean) here we do not add a new exception to the top of the chain (or ErrorTrace in the CORBA picture).

Exceptions:
AcsJACSErrTest0Ex (always)
See also:
throwACSErrTest0Ex()

void alma::acs::exceptions::ClientServerExceptionExample::throwOriginalAcsJACSErrTest0Ex  )  throws AcsJACSErrTest0Ex [inline]
 

Represents an implementation method that does not rely on any other remote method (lowest level). Therefore, the thrown AcsJACSErrTest0Ex is the VM original, i.e. not converted from an ErrorTrace.

Exceptions:
AcsJACSErrTest0Ex (always), caused by a NPE with message "mean NPE".

void alma::acs::exceptions::ClientServerExceptionExample::throwWrapperAcsJACSErrTest0Ex boolean  extractErrorTraceAutomatically  )  throws AcsJACSErrTest0Ex [inline]
 

Represents an implementation method of some client application that calls a remote method, here throwACSErrTest0Ex().

The AcsJACSErrTest0Ex that will be thrown by this "client" method is caused by an exception in the "remote" method. That remote exception is in general not the VM original, but has been converted from an ACSErrTest0Ex with an ErrorTrace which is the format the exception took on to travel over the CORBA wire.

Once caught on the client side, the remote exception is wrapped by a new AcsJACSErrTest0Ex exception whose message is "remote call failed". Thus unlike in method throwConvertedAcsJACSErrTest0Ex() here we actually add a new exception to the top of the chain (and thus add an ErrorTrace in the CORBA picture).

Parameters:
extractErrorTraceAutomatically if true, uses the constructor from a Throwable which internally finds out that it got indeed an ACS exception, and then extracts the ErrorTrace automatically; if false, explicitly gets the ErrorTrace, and uses the respective constructor.
Exceptions:
AcsJACSErrTest0Ex (always)
See also:
throwACSErrTest0Ex()


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:52:56 2009 for ACS Java API by doxygen 1.3.8