Can I invoke Runtime.gc() in an EJB


Answer posted by Mohan on 2005-05-21 19:26:48: No

Showing Answers 1 - 7 of 7 Answers

Mohan

  • May 21st, 2005
 

No

  Was this answer useful?  Yes

Dinesh

  • Sep 2nd, 2005
 

Yes, we can give a call to Runtime.gc() in EJB

  Was this answer useful?  Yes

Gaurav

  • Jan 20th, 2006
 

Who is right Mohan or Dinesh

  Was this answer useful?  Yes

vani

  • Jan 24th, 2006
 

No. You  cannot invoke Runtime.gc() in an EJB.

  Was this answer useful?  Yes

dev

  • Feb 15th, 2006
 

vani, plz give me brief answer about why we cannot use Runtime.gc() in EJB 

  Was this answer useful?  Yes

Rajendra

  • Feb 27th, 2006
 

 no we cannot invoke Runtime.gc() in an EJB

Because Enterprise Beans doesn,t need to call gc.

  Was this answer useful?  Yes

L.GANESH

  • Oct 9th, 2006
 

Hi,

We can call Runtime.gc() explicitly as you (all) described. But some time "May be usefull". Otherwise "No Use". When ?. Note that If we call garbage collection explicitly, this "WILL NOT GARBAGE COLLECT ANY ONE EJB OBJECT or TYPE of EJB bean object" These EJB (Any Type Bean) objects creation & Destroy is handled by Container "Explicitly logic" not by JVM. It may use- If we use any other "Supported Java Class Creation and other NON-EJB Objects will be garbage collected." As Explanation by Sun : "We can call, but no guranty or cannot be forced to garbage collection"

I hope that you got it.

Thanks & Regards,

L.GANESH

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions