• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Runtime.gc

 
Thomas Greene
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does Runtime.gc() work an EJB?
Thanks
 
Aravind Kumar
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anything thats possible in plain java class is possible in EJB..only that EJB spec says somethings are not advisable like for instance, multi-threading.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some containers have tools that allows admins to force garbage collections though, but I'm not sure if behind the scene the implementation calls Runtime.gc(). On the other hand you know that this is not a very good practice and calling the gc is only a hint to jvm and doesn't necessarily implies that the garbage collector will run.
Regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic