tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1153403 - in /tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909: ./ host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/
Date Wed, 03 Aug 2011 09:20:49 GMT
Author: antelder
Date: Wed Aug  3 09:20:48 2011
New Revision: 1153403

URL: http://svn.apache.org/viewvc?rev=1153403&view=rev
Log:
Tag debug mod for TUSCANY-3909

Added:
    tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/   (props changed)
      - copied from r1153390, tuscany/sca-java-1.x/tags/1.6/modules/
Modified:
    tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ServiceInvoker.java
    tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringInvoker.java

Propchange: tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Aug  3 09:20:48 2011
@@ -0,0 +1,16 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+derby.log
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+
+

Propchange: tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/
------------------------------------------------------------------------------
    svn:mergeinfo = /tuscany/branches/sca-java-1.3/modules:671193

Modified: tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ServiceInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ServiceInvoker.java?rev=1153403&r1=1153390&r2=1153403&view=diff
==============================================================================
--- tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ServiceInvoker.java
(original)
+++ tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ServiceInvoker.java
Wed Aug  3 09:20:48 2011
@@ -26,6 +26,8 @@ import java.util.logging.Logger;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageListener;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
 import javax.naming.NamingException;
 
 import org.apache.tuscany.sca.assembly.Binding;
@@ -69,6 +71,20 @@ public class ServiceInvoker implements M
         try {
             invokeService(requestJMSMsg);
         } catch (Throwable e) {
+    		try {
+            	Object payload = null;
+            	String type = null;
+            	if (requestJMSMsg instanceof TextMessage) {
+    				payload = ((TextMessage)requestJMSMsg).getText();
+            		type = "text";
+            	} else if (requestJMSMsg instanceof ObjectMessage) {
+            		payload = ((ObjectMessage)requestJMSMsg).getObject();
+            		type = "objcet";
+            	}
+            	logger.severe("TUSCANY-3909: Throwable, requestJMSMsg type: " + type + " payload:
" + payload);
+			} catch (JMSException e1) {
+            	logger.log(Level.SEVERE, "TUSCANY-3909: JMSException getting debug info", e1);
+			}
             logger.log(Level.SEVERE, "Exception send fault response '" + service.getName(),
e);
         }
     }

Modified: tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringInvoker.java?rev=1153403&r1=1153390&r2=1153403&view=diff
==============================================================================
--- tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringInvoker.java
(original)
+++ tuscany/sca-java-1.x/tags/1.6.1-TUSCANY-3909/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringInvoker.java
Wed Aug  3 09:20:48 2011
@@ -20,6 +20,7 @@ package org.apache.tuscany.sca.implement
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.util.logging.Logger;
 
 import org.apache.tuscany.sca.implementation.spring.SpringBeanElement;
 import org.apache.tuscany.sca.implementation.spring.SpringImplementation;
@@ -35,6 +36,7 @@ import org.apache.tuscany.sca.runtime.Ru
  * @version $Rev: 511195 $ $Date: 2007-02-24 02:29:46 +0000 (Sat, 24 Feb 2007) $ 
  */
 public class SpringInvoker implements Invoker {
+    private static final Logger logger = Logger.getLogger(SpringInvoker.class.getName());
 
     private Method theMethod = null;
     private Object bean;
@@ -99,6 +101,9 @@ public class SpringInvoker implements In
             return ret;
         } catch (InvocationTargetException e) {
             throw new SpringInvocationException("Spring invoker invoke method '"+ theMethod.getName()+"'
error.",e.getCause());
+        } catch (RuntimeException e) {
+        	logger.severe("TUSCANY-3909: RuntimeException, payload: " + payload + " payload
type: " + (payload==null? null : payload.getClass()) + " method: " + theMethod);
+            throw new SpringInvocationException("Spring invoker invoke method '"+ theMethod.getName()+"'
error.",e);
         } catch (Exception e) {
             throw new SpringInvocationException("Spring invoker invoke method '"+ theMethod.getName()+"'
error.",e);
         }



Mime
View raw message