aspose file tools*
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 Spring in Action this week in the Spring 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: 19720
    
  20

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What happens when JVM is Restarted?