JVM restart on Tomcat

G

GT

I'm developing a servlet app that I want to put on some cheap shared-
JVM Tomcat hosting. My servlet uses semaphores to wait for a state
update, so I need to know what happens when the servlet is waiting,
and the shared JVM is reset.

Is restarting the JVM the same as just stopping and restarting the
server? If not how would I reset the JVM on my Neteans/Tomcat setup
like my host will do?

I've had a go at stopping the server when the servlet is waiting
(server returns headers, but nothing from my servlet)
and clicking reset in tomcat manager for the appropriate app (servlet
seems completely unaffected, just continues to wait for a notify/
timeout) but I'm not convinced either of these is the JVM reset I'm
looking for.

Any pointers appreciated
 
D

Dave Miller

GT said:
I'm developing a servlet app that I want to put on some cheap shared-
JVM Tomcat hosting. My servlet uses semaphores to wait for a state
update, so I need to know what happens when the servlet is waiting,
and the shared JVM is reset.

Is restarting the JVM the same as just stopping and restarting the
server?

Yes

If not how would I reset the JVM on my Neteans/Tomcat setup
like my host will do?


I've had a go at stopping the server when the servlet is waiting
(server returns headers, but nothing from my servlet)
and clicking reset in tomcat manager for the appropriate app (servlet
seems completely unaffected, just continues to wait for a notify/
timeout) but I'm not convinced either of these is the JVM reset I'm
looking for.

I'm confused by the above - your servlet will be destroyed when the
Tomcat is shutdown. (There will be no state to maintain:)


We only rent private JVM so this is only an educated guess but the
shared Tomcat's are probably getting killed rather than stopped - it
being quicker and easier than waiting for the JVM to deallocate a bunch
of apps.

In the shameless plug department, you might want to look at a private
JVM hosting. A few bucks more a month would avoid the problems of shared.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top