[
https://issues.apache.org/jira/browse/ARIES-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849642#comment-17849642
]
ASF subversion and git services commented on ARIES-2113:
--------------------------------------------------------
Commit eef376be221700e79034bd27187d13120278ab5a in aries-rsa's branch
refs/heads/master from Amichai Rothman
[ https://gitbox.apache.org/repos/asf?p=aries-rsa.git;h=eef376be ]
ARIES-2113 - Distinguish result object, invoked method exceptions and provider
exceptions
> TCP provider doesn't distinguish returned value from thrown exceptions
> ----------------------------------------------------------------------
>
> Key: ARIES-2113
> URL: https://issues.apache.org/jira/browse/ARIES-2113
> Project: Aries
> Issue Type: Bug
> Components: Remote Service Admin
> Affects Versions: rsa-1.16.1
> Reporter: Amichai Rothman
> Priority: Major
>
> The TCP provider currently returns a single object from the remote
> invocation, which can be either the result object or an exception. While this
> works in most cases, it is technically incorrect since a method can return an
> exception object without throwing it so the two cases should be treated
> differently. It should return both an exception (which is rethrown if not
> null) and the result object (which is returned to caller normally even if it
> is a Throwable).
> Furthermore, when an exception is thrown/returned, there is ambiguity between
> an exception thrown by the invoked method implementation itself (which should
> be thrown transparently to the caller) and those caused by the provider (bugs
> or otherwise which should probably be remote ServiceExceptions). A simple
> solution is to always wrap method implementation exceptions in an
> InvocationTargetException (as invoke already does but the async result
> resolution does not) and other provider exceptions (explicit or implicit)
> thrown as-is. The receiver can then distinguish the two and process them
> differently if necessary.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)