Express (Distributed operating systems), v8.0 > Secure applications and their environment > Authenticate users > Select a registry or repository > Manage realms in a federated repository > Virtual member manager > Troubleshoot and Support


Exception handling

Virtual member manager reports the error condition to its caller in the form of an exception.

Virtual member manager does not generate any events and does not respond to any notifications. Virtual member manager logs the error and reports the error condition to its caller in the form of an exception that contains the repository-specific error code and the repository information. In most of the cases exceptions are reported back to the caller. Subclasses of WIMException are created to report various kinds of errors or exceptions generated in virtual member manager. If the exception is generated because of unavailability of repository or registry and there is retry code (automatic recovery), then the exception is not thrown back immediately, although it is logged. An exception is thrown after the retry fails and a user action is required to fix the problem.

WIMException replaces WMMException and provides all the methods that were provided by WMMException. The adapters and providers can exploit these methods. However, to maintain backward compatibility, WIMException is compatible with WMMException through the WebSphere Member Manager bridge that transforms WMMExceptions into WIMExceptions and WIMExceptions back into WMMExceptions.


Repository exceptions

Exceptions thrown by the repositories might have methods to retrieve error code or error message or both (in addition to other methods specific to the exception). Adapters use those methods to construct WIMException or its subclass and set following information:

cause

Specifies any exception thrown by the repository, or null if repository did not generate any exception. Virtual member manager uses the Exception Chaining facility of JDK 1.4 to build the chain of exception as it passes through various virtual member manager components.

rootErrorCode

Specifies a repository-specific integer error code. Normally it is the actual error code returned by the repository. If an exception is thrown or an error message is returned by the repository, the adapter must retrieve the error code from the exception and set the root cause in the generated WIMException so that the root cause can be logged in the trace file for analysis of the exception problem. After the error code is set, it must not be overwritten.

rootErrorMessage

Specifies a repository-specific error message. Normally it is the actual error message returned by the repository. If the exception is thrown by the repository, the adapter must retrieve the error message from the exception and set the root cause in the generated WIMException so that the root cause can be logged in the trace file for analysis of the exception problem. After the error message is set , it must not be overwritten.

rootErrorSource

Specifies a repository identifier string used to uniquely identify a repository as the source of the error.
The adapter also logs (using JSR-47 APIs) the exception, error code, and error message in its original form to the virtual member manager log file. All the adapters write to the same log file. If the tracing is turned on then the error message can be logged in to the trace file also. Applications can log the exception to their own log files.

While passing through different layers in virtual member manager, if the exception is being wrapped into another exception, the rootErrorCode, rootErrorMessage, and rootErrorSource are copied from the original exception and the cause is set to the exception received by that layer.

The adapter communicates the error condition to virtual member manager by a virtual member manager specific exception that is, WIMException or its subclass. The WIMException constructed by the adapters provides methods to set the error returned by the repositories to enable them to propagate the low level error code or message or both to the caller.

In some cases, instead of returning error code, the repository might return an error message or an exception that contains the error message. The error message, in turn, might contain the error code. The adapter must extract the error code or message and set them in the WIMException. All the exceptions defined in virtual member manager are subclasses from WIMException and may add exception-specific methods.

Parent topic: Troubleshoot and Support



+

Search Tips   |   Advanced Search