Declare your logger "final static"
First, thanks for the support during java.lang.OutOfMemory error. I did reduce the chache size as well as addec the java option -Xmx256m. This was option also with JOnAs. So that issue got resolved.
Now the next issue is with the Logger. Our application is having a Logger calss, which uses Category of org.apache.log4j. We were using an old version of log4j. So changed some code in our Logger to suit Jboos log4j. As I said earlier, the erro persist.
To make myself clear of your suggestion, declare the Logger class itself final or did you mean whereever Logger is used declare is as final and static. I think the latter scenario is already followed.
If you declare an object static, it is at class level
and won't be serialized during passivation.
final is for spec compliance.
I got around the problem in a round abt way!.
The Beans that were throwing this error were stateful beans. Since the Category(log4j) class is not serializable, during passiavtion it throws the error. Am I right?
I changed all these beans into Stateless beans, the problem got resolved.
The reason being in our app it these beans doesnt use any state to be stored.