File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Runtime.gc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Runtime.gc" Watch "Runtime.gc" New topic


Thomas Greene
Ranch Hand

Joined: Aug 09, 2004
Posts: 127
Does Runtime.gc() work an EJB?
Aravind Kumar
Ranch Hand

Joined: Nov 03, 2003
Posts: 39
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

Joined: Feb 17, 2005
Posts: 704
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.

I think, therefore I exist -- Rene Descartes
I agree. Here's the link:
subject: Runtime.gc
It's not a secret anymore!