You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Dr. Evil" <dr...@sidereal.kz> on 2001/11/08 04:37:11 UTC

Mutli-process servers and objects in the Container context

When I start up Tomcat using the startup.sh script, it launches a
bunch of JVMs, with a server running in each one.

In my application, I am thinking of storing a bunch of information in
objects which will be stored in the Container context.  Let's say that
I am doing a traffic report website.  I might have a TrafficReports
object, which some users view (probably through custom tags) and some
users update ("I saw an accident at ...").

Here's my question: Let's say that one user submits a traffic report
at a certain location ("accident near the airport exit"), which is
picked up in the TrafficReports object.  Then another user requests a
traffic report at the same location.  It seems that if the requesting
user hits one of the JVMs that is different from the one where the
reporting user made the report, the requesting user won't see it.  Is
this true?  How is this handled?  Should I send all the reports to a
database and have all queries hit the database, or is there a way to
do this just using objects in java?

Some of you may say, "Well, you should probably store all this in a
database anyway", which may be true for some things, but may not be
true for other things, like maybe a chat forum.

Thanks for any tips

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Mutli-process servers and objects in the Container context

Posted by "Dr. Evil" <dr...@sidereal.kz>.
> > When I start up Tomcat using the startup.sh script, it launches a
> > bunch of JVMs, with a server running in each one.
> 
> Those are not processes... Those are threads (look in the archives, 2 weeks
> ago I made a long digression about it, and why linux's threading
> implementation sucks)

Thanks for that info.  I'll look at the threads thread.  That answers
my question.  Now I just have to get all my servlets/filters to talk
to the ServletContext object in a nice way.

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Mutli-process servers and objects in the Container context

Posted by Pier Fumagalli <pi...@betaversion.org>.
Dr. Evil at drevil@sidereal.kz wrote:

> 
> When I start up Tomcat using the startup.sh script, it launches a
> bunch of JVMs, with a server running in each one.

Those are not processes... Those are threads (look in the archives, 2 weeks
ago I made a long digression about it, and why linux's threading
implementation sucks)


    Pier


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>