[jboss-user] [Clustering/JBoss] - Re: StateTransferTimeout appears to be ignored

bstansberry@jboss.com do-not-reply at jboss.com
Fri Feb 8 12:31:18 EST 2008


Here's the code that's being executed during the logging gap:


  |          log.debug("setState called");
  |          if (obj == null)
  |          {
  |             log.debug("state is null");
  |             return;
  |          }
  |          
  |          long used_mem_before, used_mem_after;
  |          int state_size=obj != null? obj.length : 0;
  |          Runtime rt=Runtime.getRuntime();
  |          used_mem_before=rt.totalMemory() - rt.freeMemory();
  | 
  |          HashMap state = (HashMap)objectFromByteBuffer(obj);
  |          java.util.Iterator keys = state.keySet().iterator();
  |          while (keys.hasNext())
  |          {
  |             String key = (String)keys.next();
  |             log.debug("setState for " + key);
  | 

Here's the objectFromByteBuffer() code:


  |    public static Object objectFromByteBuffer (byte[] buffer) throws Exception
  |    {
  |       if(buffer == null) 
  |          return null;
  | 
  |       ByteArrayInputStream bais = new ByteArrayInputStream(buffer);
  |       MarshalledValueInputStream mvis = new MarshalledValueInputStream(bais);
  |       return mvis.readObject();
  |    }
  | 

This is all in the org.jboss.ha.framework.server.HAPartitionImpl class, found in the cluster module of the AS source.

It's possible there is some issue with the MarshalledValueInputStream.readObject() call although I doubt it. In this case it's basically just an ordinary java.io.ObjectInputStream.readObject() call.  And as you can see from the final log message, the byte[] it's deserializing is only 1466 bytes; hardly anything.  If that were having issues I expect I'd hear more about it from others.

Perhaps something the memory calculation business? That at least is somewhat environment-specific.  Just a wild guess.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127924#4127924

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127924



More information about the jboss-user mailing list