[jira] Commented: (TUSCANY-2225) RuntimeExceptions thrown by @OneWay methods are not logged anywhere

2008-04-14 Thread Mark Combellack (JIRA)

[ 
https://issues.apache.org/jira/browse/TUSCANY-2225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588551#action_12588551
 ] 

Mark Combellack commented on TUSCANY-2225:
--

I've updated the code in 
org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor to check for 
exceptions as a result of invoke(). The code will now throw 
ServiceRuntimeException. This is now propogated up to the ThreadPoolWorkManager.

The ThreadPoolWorkManager now detects the Exception being thrown and calls the 
workCompleted() with the exception that was thrown. This will then lookup the 
listener and notify it of the failure.

The problem is that Tuscany does not register a listener so the Exception is 
still ignored!

> RuntimeExceptions thrown by @OneWay methods are not logged anywhere
> ---
>
> Key: TUSCANY-2225
> URL: https://issues.apache.org/jira/browse/TUSCANY-2225
> Project: Tuscany
>  Issue Type: Bug
>  Components: Java SCA Core Runtime
>Affects Versions: Java-SCA-Next
> Environment: trunk svn revision 647147
> Linux
>Reporter: Mark Combellack
>Assignee: Mark Combellack
> Fix For: Java-SCA-Next
>
>
> If a @OneWay method throws a RuntimeException, the exception is lost. It is 
> not logged anywhere and there is no way to tell it has happened. This makes 
> it extremely hard for a developer to debug problems with @OneWay methods in 
> their applications.
> The client code that invokes the @OneWay method will not be told of the 
> failure as per the contract of the @OneWay scemantics.
> However, the fact that the exception occurred should be recorded somwhere so 
> the developer can attempt to diagnose the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (TUSCANY-2225) RuntimeExceptions thrown by @OneWay methods are not logged anywhere

2008-04-14 Thread Mark Combellack (JIRA)

[ 
https://issues.apache.org/jira/browse/TUSCANY-2225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588532#action_12588532
 ] 

Mark Combellack commented on TUSCANY-2225:
--

The problem actually comes from the use of the 
org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor from the core 
module.

The code contains the following in the invoke method:

workScheduler.scheduleWork(new Runnable() {
public void run() {
Message context = 
ThreadMessageContext.setMessageContext(msg);
try {
next.invoke(msg);
} finally {
ThreadMessageContext.setMessageContext(context);
}
}
});

The code will:

1) Use the WorkSchedular to run the @OneWay operation in a separate thread. 
2) That separate thread will call next.invoke(msg) which will return the result 
of running the @OneWay invocation
3) The return value from next.invoke() will be the result message (will call it 
result). Since the @OneWay method threw an Exception, result.isFault() is true
4) The above code does not bother to check the result to see if it is an 
exception. It just completely ignores the return value.



What the code should do is check whether the return value from  
next.invoke(msg) indicates an exception. If it does, then it should handle it 
appropriately.

> RuntimeExceptions thrown by @OneWay methods are not logged anywhere
> ---
>
> Key: TUSCANY-2225
> URL: https://issues.apache.org/jira/browse/TUSCANY-2225
> Project: Tuscany
>  Issue Type: Bug
>  Components: Java SCA Core Runtime
>Affects Versions: Java-SCA-Next
> Environment: trunk svn revision 647147
> Linux
>Reporter: Mark Combellack
>Assignee: Mark Combellack
> Fix For: Java-SCA-Next
>
>
> If a @OneWay method throws a RuntimeException, the exception is lost. It is 
> not logged anywhere and there is no way to tell it has happened. This makes 
> it extremely hard for a developer to debug problems with @OneWay methods in 
> their applications.
> The client code that invokes the @OneWay method will not be told of the 
> failure as per the contract of the @OneWay scemantics.
> However, the fact that the exception occurred should be recorded somwhere so 
> the developer can attempt to diagnose the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]