This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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
Don't get me started about those stupid light bulbs.
subject: Runtime.gc
It's not a secret anymore!