Author: mcombellack
Date: Thu Apr 17 05:22:59 2008
New Revision: 649060
URL: http://svn.apache.org/viewvc?rev=649060&view=rev
Log:
TUSCANY-2225 - Any exceptions that are thrown by a @OneWay operation are now
logged to the JDK Logger
Modified:
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java
Modified:
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java?rev=649060&r1=649059&r2=649060&view=diff
==============================================================================
---
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java
(original)
+++
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java
Thu Apr 17 05:22:59 2008
@@ -20,6 +20,8 @@
import java.util.LinkedList;
import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.Interceptor;
@@ -39,6 +41,11 @@
private static final Message RESPONSE = new ImmutableMessage();
+ /**
+ * The JDK logger that will be used to log messages.
+ */
+ private final static Logger LOGGER =
Logger.getLogger(NonBlockingInterceptor.class.getName());
+
private WorkScheduler workScheduler;
private Invoker next;
@@ -73,8 +80,11 @@
// Tuscany-2225 - Did the @OneWay method complete
successfully?
// (i.e. no exceptions)
if (response != null && response.isFault()) {
- // The @OneWay method threw an Exception.
+ // The @OneWay method threw an Exception. Lets log
it and
+ // then pass it on to the WorkScheduler so it can
notify any
+ // listeners
Throwable t = (Throwable) response.getBody();
+ LOGGER.log(Level.SEVERE, "Exception from @OneWay
invocation", t);
throw new ServiceRuntimeException("Exception from
@OneWay invocation", t);
}
} finally {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]