Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

removalTimeoutSeconds=0 => memory(disk) leak?  RSS feed

 
Kevin Embree
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need someone to explain this to me.

If I have a stateful EJBs and the configuration parameter removalTimeoutSeconds=0 set which means infinity or never remove.
Wouldn't any stateful EJB that is not explicitly removed in code kept forever? And would that not ultimately result in consumption of all my disk space as EJB after EJB that is idle gets Passivated?

What am I missing???
 
Claude Moore
Ranch Hand
Posts: 875
8
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for documentation, setting removal TimeoutSeconds parameter to zero indeed causes SFSBs not to be removed after being idle for 'n' seconds. This said, I think that a scenario where passivated Ejb s consume all your disk space is practically impossible: you should have a very very small storage to make this happen. I don't know what happens under the hood when passivation occurs, but by sense I would say that Ejb objects are serialized to disk. The amount, in term of space on disk of these objects shouldn't be too much different from their consumed amount of memory, so you should have less disk memory than RAM memory to have problems with passivation itself.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!