| Summary: | Replacing a thrown exception from an executing remote service | ||
|---|---|---|---|
| Product: | [RT] Riena | Reporter: | Stefan Liebig <Stefan.Liebig> |
| Component: | communication | Assignee: | Stefan Liebig <Stefan.Liebig> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | christian.campo, leif.baierl |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | 322701 | ||
| Bug Blocks: | |||
Riena has the concept of call and service hooks. Call hooks will be executed before and after a remote service call has been initiated from the client and service hooks will be called before and after the remote service call on the server side. Both before and after call will be passed a service context object created for this call. This service context contains information like the service description but also information regarding the current communication like http headers. The service context has now been extended so that it can contain a possible target exception that has be thrown when executing the remote service. With this it is now possible that a service hook may check this exception and replace it with a different one. And the replaced exception will be thrown instead of the original exception. |
For a Riena based application that we are currently creating we have the problem that a remote service may throw (runtime) exceptions (javax.persistence.*) which are unknown on the client side. Since Riena uses the Hessian protocol for remote service invocation such an exception would also be serialized and transferred to the client. And this will fail if the exception class is not "available" ("classpath") on the client. It would be nice to have a possibility on the server to exchange the "alien" exception with a "friendly" exception.