wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r819383 - /incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java
Date Sun, 27 Sep 2009 19:18:25 GMT
Author: bluk
Date: Sun Sep 27 19:18:25 2009
New Revision: 819383

URL: http://svn.apache.org/viewvc?rev=819383&view=rev
Log:
Change debug to identify actual resource instance

Modified:
    incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java

Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java?rev=819383&r1=819382&r2=819383&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java
(original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/handlers/InvokeMethodHandler.java
Sun Sep 27 19:18:25 2009
@@ -23,15 +23,16 @@
 import java.lang.reflect.Method;
 import java.util.Arrays;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.wink.server.handlers.AbstractHandler;
 import org.apache.wink.server.handlers.MessageContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class InvokeMethodHandler extends AbstractHandler {
 
     private static final Logger logger = LoggerFactory.getLogger(InvokeMethodHandler.class);
 
+    @Override
     public void handleRequest(MessageContext context) throws Throwable {
         try {
             SearchResult searchResult = context.getAttribute(SearchResult.class);
@@ -40,15 +41,17 @@
             Object instance = searchResult.getResource().getInstance(context);
             if (logger.isDebugEnabled()) {
                 logger
-                    .debug("Invoking method {} of declaring class {} on the instance of a
class {} with parameters {}",
+                    .debug("Invoking method {} of declaring class {} on the instance of a
class {}@{} with parameters {}",
                            new Object[] {javaMethod.getName(),
                                javaMethod.getDeclaringClass().getName(),
-                               instance.getClass().getName(), Arrays.toString(parameters)});
+                               instance.getClass().getName(),
+                               Integer.toHexString(System.identityHashCode(instance)),
+                               Arrays.toString(parameters)});
             }
             Object result = javaMethod.invoke(instance, parameters);
             context.setResponseEntity(result);
         } catch (InvocationTargetException ite) {
-            logger.debug("Excpetion encountered during invocation: {}", ite.getTargetException());
+            logger.debug("Exception encountered during invocation: {}", ite.getTargetException());
             throw ite.getTargetException(); // unpack the original exception
         }
     }



Mime
View raw message