This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes What happens when JVM is Restarted? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What happens when JVM is Restarted?" Watch "What happens when JVM is Restarted?" New topic
Author

What happens when JVM is Restarted?

Chandramohan
Greenhorn

Joined: Jan 06, 2007
Posts: 6
Hi,

when our applications response time becomes slow or application itself gets hung, we restart the JVM's. In the top level i know that the memory is released,cleared and reinitialized once it is started. But in detail, what is happening beneath this? Is there any link that you guys can help me out with?

Thanks a lot.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

It all depends on your operating system.

The JVM process is completely stopped, and a new JVM process is started. Most likely the threads from the first process are all stopped, its memory is marked as safe for reuse, and a new memory pool is reserved for the second process.

It's just like any other process.


If I were you however, I would try to investigate WHY the application is slowing down and hanging. Perhaps it is a memory problem; objects that cannot be garbage collected because there is still a live reference somewhere that you might not need. Perhaps something else. You'll need to do a lot of debugging and profiling to find out.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Chandramohan
Greenhorn

Joined: Jan 06, 2007
Posts: 6
Thanks Rob.
 
Don't get me started about those stupid light bulbs.
 
subject: What happens when JVM is Restarted?
 
Similar Threads
EL questioin
Serialization
How to add user deefined Attributes to html tags
rtexprvalue
General