[jboss-cvs] JBossCache/src/org/jboss/cache/loader ...

Vladmir Blagojevic vladimir.blagojevic at jboss.com
Fri Sep 22 14:16:32 EDT 2006


  User: vblagojevic
  Date: 06/09/22 14:16:32

  Modified:    src/org/jboss/cache/loader   NodeDataExceptionMarker.java
                        AbstractCacheLoader.java
  Log:
  improve state transfer error handling
  
  Revision  Changes    Path
  1.2       +11 -3     JBossCache/src/org/jboss/cache/loader/NodeDataExceptionMarker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeDataExceptionMarker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/NodeDataExceptionMarker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- NodeDataExceptionMarker.java	13 Sep 2006 15:42:16 -0000	1.1
  +++ NodeDataExceptionMarker.java	22 Sep 2006 18:16:31 -0000	1.2
  @@ -6,16 +6,18 @@
   
   public class NodeDataExceptionMarker extends NodeData
   {
  -   Throwable cause = null;
  +   Throwable cause;
  +   Object cacheNodeIdentity;  
   
      public NodeDataExceptionMarker()
      {
         super();
      }
   
  -   public NodeDataExceptionMarker(Throwable t)
  +   public NodeDataExceptionMarker(Throwable t,Object node)
      {
         cause = t;
  +      cacheNodeIdentity = node;    
      }
   
      public Throwable getCause()
  @@ -23,6 +25,11 @@
         return cause;
      }
   
  +   public Object getCacheNodeIdentity()
  +   {
  +      return cacheNodeIdentity;
  +   }
  +
      public boolean isExceptionMarker()
      {
         return true;
  @@ -32,12 +39,13 @@
      {
         super.writeExternal(out);
         out.writeObject(cause);
  -
  +      out.writeObject(cacheNodeIdentity);     
      }
   
      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      {
         super.readExternal(in);
         cause = (Throwable) in.readObject();
  +      cacheNodeIdentity = in.readObject();     
      }
   }
  
  
  
  1.8       +3 -1      JBossCache/src/org/jboss/cache/loader/AbstractCacheLoader.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AbstractCacheLoader.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/AbstractCacheLoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- AbstractCacheLoader.java	22 Sep 2006 17:04:49 -0000	1.7
  +++ AbstractCacheLoader.java	22 Sep 2006 18:16:31 -0000	1.8
  @@ -70,7 +70,9 @@
            {
               if (nd.isExceptionMarker())
               {
  -               throw new CacheException("State provider cacheloader threw exception during loadState", ((NodeDataExceptionMarker) nd).getCause());
  +               NodeDataExceptionMarker ndem = (NodeDataExceptionMarker) nd;
  +               throw new CacheException("State provider cacheloader at node " + ndem.getCacheNodeIdentity()
  +                     + " threw exception during loadState (see Caused by)", ndem.getCause());
               }
   
               if (moveToBuddy)
  
  
  



More information about the jboss-cvs-commits mailing list