[jboss-user] [EJB/JBoss] - Re: Infinite loop Exception while passivating a SFSB

rapowder do-not-reply at jboss.com
Tue Aug 5 04:47:24 EDT 2008


Hi again, 

so I'm back from vacation, digging on the problem again. 

anonymous wrote : 
  | A recursive write is okay, but if you keep adding circular references you won't have stack to process the recursive calls necessary here.
  | 
  | Something like:
  | 
  | Map.put(key, AnotherMap);
  | AnotherMap.put(key,SubMap);
  | Maybe indirectly through fields? 
  | 

I tried to encapsulate many HashMaps and serializing them actually gave me the same exception. So root cause is a StackOverflow as you suggested.

Since in my code I don't have such deep encapsulations, I guess it's an indirect encapsulation through the objects contained in my HashMaps.
I tried to fill as maximum as possible the HashMap in the Bean that may be the cause of the exception, but serialization still worked fine.

So, here is my question:

When serialization occurs, a stack is created for each serialized field or for the whole bean, or even for all serialized beans?
Practically what I'm trying to understand is if the number of serialized beans may have an influence or not?
If I can't reproduce the exception "filling" all the fields of the "guilty" bean, could it help to navigate through my whole webclient in order to maximize the number of serialized beans?





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

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



More information about the jboss-user mailing list