[jbosscache-commits] JBoss Cache SVN: r7390 - core/trunk/src/main/java/org/jboss/cache/marshall.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Wed Jan 7 12:51:17 EST 2009
Author: mircea.markus
Date: 2009-01-07 12:51:17 -0500 (Wed, 07 Jan 2009)
New Revision: 7390
Modified:
core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java
core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
Log:
enhanced logging
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java 2009-01-07 17:50:28 UTC (rev 7389)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CacheMarshaller200.java 2009-01-07 17:51:17 UTC (rev 7390)
@@ -194,8 +194,14 @@
}
marshallObject(o, out, refMap);
}
+ catch (Exception th)
+ {
+ if(log.isErrorEnabled()) log.error("Error while marshalling object: " + o, th);
+ throw th;
+ }
finally
{
+ if (log.isTraceEnabled()) log.trace("Done serializing object: " + o);
current.setContextClassLoader(old);
}
}
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2009-01-07 17:50:28 UTC (rev 7389)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/CommandAwareRpcDispatcher.java 2009-01-07 17:51:17 UTC (rev 7390)
@@ -221,7 +221,10 @@
{
try
{
- return executeCommand((ReplicableCommand) req_marshaller.objectFromByteBuffer(req.getBuffer(), req.getOffset(), req.getLength()), req);
+ ReplicableCommand command = (ReplicableCommand) req_marshaller.objectFromByteBuffer(req.getBuffer(), req.getOffset(), req.getLength());
+ Object execResult = executeCommand(command, req);
+ if (log.isTraceEnabled()) log.trace("Command : " + command + " executed, result is: " + execResult);
+ return execResult;
}
catch (Throwable x)
{
@@ -302,6 +305,7 @@
}
catch (Exception e)
{
+ if (log.isErrorEnabled()) log.error(e);
throw new RuntimeException("Failure to marshal argument(s)", e);
}
More information about the jbosscache-commits
mailing list