james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mohan narayanaswamy <mohan...@yahoo.co.uk>
Subject RE: Tomcat + James in a single jvm process
Date Thu, 06 Jun 2002 03:51:46 GMT
Thanks Mr.Clinton Goudie,
I am going to try this. I'll get back u asap.
:) Thanks lot.

with warm regards,
Mohan

 --- Clinton Goudie <ClintJakarta@magicalspirits.net>
wrote: > If you really want to pull this off, create
yourself
> a java class that looks
> about like this...
> 
> public class WebServices{
>      public static void main(String[] args){
>           new Thread(){
>                public void run(){
>                    
> org.apache.avalon.phoenix.launcher.Main.main(null);
>                }
>           }.start();
>           new Thread(){
>                public void run(){
>                    
>
org.apache.catalina.startup.BootstrapService.main(null);
>                }
>           }.start();
>      }
> }
> 
> Compile it and off you should go.
> 
> The next step would be to configure the
> JavaService.exe that tomcat uses to
> start and stop this wrapper class..;
> 
> Keep in mind the liabilities you're encountering
> that have already been
> discussed involving memory and resources. In
> addition you also have the
> liability that if either app calles System.exit it's
> going to kill both.
> 
> Personally, I prefer to run them both as separate
> services so that I can
> stop and start the different services individually.
> 
> Clint
> 
> -----Original Message-----
> From: mohan narayanaswamy
> [mailto:mohandb2@yahoo.co.uk]
> Sent: Wednesday, June 05, 2002 12:20 AM
> To: James Developers List
> Subject: Re: Tomcat + James in a single jvm process
> 
> Thankyou Michael,
> 
> I am seriously thinking about ur way of solution.
> it's
> too cool.
>   But i have some silly questions in my mind. if EJB
> container+any-embeded-sql-server(java based)+servlet
> container can run in a single JVM why can't i do the
> same. And think about the other benefits.
> 
>   Client can simply invoke only one script which is
> easy to maintain. And by tradition normally all the
> product will run in a single process( am not sure ).
> moreover what i want to know  is how can i embed or
> include some other package inside james or tomcat.
> so
> that we can integarate any other server.
> 
> with warm regards
> Mohan
> 
> 
> 
>  --- Michael Locasto <mlocasto@pfsmarketing.com>
> wrote: > Mohan,
> >
> > While it is true that starting and running a
> single
> > JVM instance is less
> > expensive (mostly in terms of memory)
> > than starting and running two or more JVMs on the
> > same processor/box,
> > there are several good reasons for
> > keeping Tomcat and James running in separate JVMs.
> > Trying to avoid the
> > "overhead" of two JVMs really
> > doesn't gain you anything significant. What is
> more
> > critical is the work
> > done inside the two threads (James,Tomcat).
> >
> > Heap size is a concern. JVMs have a limit on the
> > amount of memory they use
> > by default. You can run the JVM with a -server
> > option, which AFAIK increases that limit. However,
> > depending on your load,
> > having both Tomcat and James in the same JVM may
> > cause you to run
> > into a shortage of resources within the JVM, even
> > though you may have
> > saved on memory outside the JVM.
> >
> > Second, you are putting all your eggs in one
> basket
> > (sorry for the idiom).
> > Putting both Tomcat and James in the same JVM
> > is not a fault-tolerant solution. If the JVM
> > crashes, you lose both your
> > servers. If your clients have a two processor
> > machine,
> > or two boxes, keeping them separate will provide
> you
> > and them with a more
> > scaleable solution.
> >
> > Third, it should be relatively simple for you to
> > write a custom
> > start/build script that runs both Tomcat and
> James.
> > In this way, it
> > still "looks" like you are starting a single
> > process, but inside the
> > script you start 2 JVMs (or call the Tomcat
> startup
> > script and the James
> > startup script). That approach is much easier than
> > trying to tie the two
> > binaries together or compile a custom version.
> >
> > If you are looking for tutorials for Tomcat, the
> > documentation within the
> > Tomcat distributions and on the tomcat website is
> > very good. http://jakarta.apache.org/tomcat/  The
> > default configuration
> > for the Tomcat distribution runs with minimal
> > changes.
> > Of course, what JSP/webapps you put in from there
> is
> > another story ;) The
> > tomcat-users mailing list should be fairly helpful
> > along with the docs.
> > I hope this has been helpful.
> >
> > Cheers,
> > Michael
> >
> >
> > ----- Original Message -----
> > From: "mohan narayanaswamy" <mohandb2@yahoo.co.uk>
> > To: "James Developers List"
> > <james-dev@jakarta.apache.org>
> > Sent: Tuesday, June 04, 2002 7:02 AM
> > Subject: RE: Tomcat + James in a single jvm
> process
> >
> >
> > > single JVM process will reduce the overload.
> > > u will be required less cpu,memory and moreover
> > > efficient when compared to two process server.
> > >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:james-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:james-dev-help@jakarta.apache.org>
> >
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <mailto:james-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:james-dev-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:james-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:james-dev-help@jakarta.apache.org>
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message