The Artima Developer Community
Sponsored Link

Java Answers Forum
Application in a server environment

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mmutla

Posts: 10
Nickname: mmutla
Registered: Aug, 2003

Application in a server environment Posted: Oct 22, 2003 6:34 AM
Reply to this message Reply
Advertisement
If I run a web application that uses "normal" Java classes, say this application is running under Tomcat or any other web container, (1) do I need to be consent about synchronizing the code in "normal" classes? By normal classes I mean classes that I can run in any Java JVM. An example could be an Employee class which does all sorts of things. This Employee class might have methods that requests data from the database (asking other objects to access the database for it), for instance and many other operations that need to be executed atomically.

My understanding so far is that when a web application executes, there is only one JVM that is started. Any other object(servlet) whose services are required will be instantiated and run under the running JVM through threads. The Employee class I mentioned above, (2)if its instance is required to provide some kind of a service to a servlet, is it also loaded in the running JVM or is a separate JVM started for it and any other non-servlet objects?

I am gratefully looking forward to your replies to my two questions.

Mmutla

Topic: Stream Tokeneizer Previous Topic   Next Topic Topic: ERROR: uncaught servlet exception

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use