Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Running 2 webapp in Tomcat - 1 or 2 JVMs

Reply
Thread Tools

Running 2 webapp in Tomcat - 1 or 2 JVMs

 
 
James Yong
Guest
Posts: n/a
 
      11-28-2005
Hi,

If I run 2 web applications in a Tomcat, is that 2 web application run by 2
JVMs or 1 JVM?

Regards,
James


 
Reply With Quote
 
 
 
 
poundinc@yahoo.com
Guest
Posts: n/a
 
      11-28-2005
Hello
1 JVM.I suppose it is virtual

 
Reply With Quote
 
 
 
 
poundinc@yahoo.com
Guest
Posts: n/a
 
      11-28-2005
Hello
1 JVM.I suppose it is virtual

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-28-2005
On Mon, 28 Nov 2005 23:27:32 +0800, "James Yong" <james$@i$.com>
wrote, quoted or indirectly quoted someone who said :

>If I run 2 web applications in a Tomcat, is that 2 web application run by 2
>JVMs or 1 JVM?


One.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
James Yong
Guest
Posts: n/a
 
      11-28-2005

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hello
> 1 JVM.I suppose it is virtual
>


Thanks.

Does that means that it is impossible to implement RMI between them, since
RMI requires at least 2 JVM to work?

Regards,
James


 
Reply With Quote
 
cbroussard@liquiddatainc.com
Guest
Posts: n/a
 
      11-28-2005
i believe, if you are under 1 jvm you would be able to share objects
between the two contexts.

things to try (in any order of preference)
1) you might have to write a patch and alter tomcat to add a hook into
the bootstrap to do this "under the table"..

2) the more appropriate way would be to do it "above the table", and
have a servlet to servlet communication through a post/get... assuming
the table is conceptually at the context level.

3) another possibility i just thought of, is to do this via jndi.
that's kinda the purpose of it. and probably the best solution.

4) run two seperate jvm's and then rmi would make more sense.

www.binaryfrost.com

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-29-2005
On Tue, 29 Nov 2005 01:57:55 +0800, "James Yong" <james1@$1.com>
wrote, quoted or indirectly quoted someone who said :

>Does that means that it is impossible to implement RMI between them, since
>RMI requires at least 2 JVM to work?


the R in RMI stands for Remote. It jumps through hoops because sender
and receiver are in different JVMS. When they are in the same JVM you
can simply and efficiently past references back and forth.

Typically, RMI involves at least three JVMs, a RMI server, an RMI
application server and a client.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-29-2005
On 28 Nov 2005 10:18:57 -0800, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote,
quoted or indirectly quoted someone who said :

>1) you might have to write a patch and alter tomcat to add a hook into
>the bootstrap to do this "under the table"..


a garden variety static class will let anyone communicate with anyone
in a JVM.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      11-29-2005
On Tue, 29 Nov 2005 02:37:28 GMT, Roedy Green
<(E-Mail Removed) > wrote, quoted or
indirectly quoted someone who said :

>a garden variety static class will let anyone communicate with anyone
>in a JVM.


More precisely the static variables of a garden variety class will let
anyone communicate with anyone within a JVM.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
John C. Bollinger
Guest
Posts: n/a
 
      11-29-2005
James Yong wrote:
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>
>>Hello
>>1 JVM.I suppose it is virtual
>>

>
>
> Thanks.
>
> Does that means that it is impossible to implement RMI between them, since
> RMI requires at least 2 JVM to work?


It probably does mean that you cannot do RMI between the two apps, but
I'm not certain of it. A better question for you to think about,
however, is whether it makes sense to split things up into two web
applications in the first place when they are tightly enough bound
together that you /want/ to do RMI between them.


--
John Bollinger
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to start with a webapp that is not really a webapp Andrew Java 7 06-28-2009 08:42 PM
changing log file of log4j for an individual package within a webapp running on Tomcat vishal.changrani@gmail.com Java 1 06-03-2007 01:51 AM
What should I do webapp or webservice + webapp? jhooper71@yahoo.com ASP .Net 6 02-10-2006 02:07 PM
Tomcat question - running tomcat webapp from root Sean Berry Java 3 12-19-2005 07:19 PM
Communication between Java applications running on different JVMs laura.paterson@gmail.com Java 1 01-05-2005 12:25 PM



Advertisments