Hi William,

Regarding "multiple ContextManagers" - IMHO it should be possible to do
that, but it's not a very tested feature. 

If what you want to do is support virtual hosts - tomcat supports 
virtual hosts using a single ContextManager ( the contextManager is a
representation for a "server" that may have multiple hosts).

There is no special representation for Host ( as a top-level object ) -
each Context belongs to a virtual host, and the mapper is routing the
requests. You can add additional modules to filter or do other tricks.
( just use Context.getHost() or getHostAliases() ). 

If you want to isolate applications/hosts - using separate VMs may give
you more benefits.

There are cases when multiple ContextManagers may help - for example if
the servers have very different configuration ( i.e. top-level modules
for mapping, etc).

In 3.3 ( with the experimental ProfileLoader ) you can push all the
modules as per/context interceptors, i.e. separate sets of 
modules for each web application - what's shared is the config modules
and the top-level mapper. That means even fewer reasons to have multiple
ContextManagers.

IMHO if what you want to do requires changes/fixes in tomcat, you should
try tomcat 3.3, where it is still possible to do this kind of change 
( assuming it's not too big ). For 3.2.2 I don't think this can be
clasified as a critical bug, and I don't think Marc would enjoy it :-)



Costin



>       Could you point me more specifically at where Enhydra uses multiple
> ContextManagers?  I just downloaded EE 4.0a4 and couldn't find any files
> that have examples of multiple ContextManagers on different ports serving
> groups of apps.  Whenever I try to use multiple ContextManagers on different
> ports I get lots of messages about removing duplicate servlets (like the jsp
> servlet, status servlet, exception servlet), and tomcat is unresponsive to
> any of my requests and refuses to shutdown, until I 'kill' it.
> 
> Any help on figuring this out would be great.  From my code archeology I was
> just about to conclude that it wasn't possible in tomcat 3.2.1 until your
> comment made me think that I had missed something.
> 
> -Bill
> 
> > -----Original Message-----
> > From: Shawn McMurdo [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 06, 2001 10:25 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Assigning Servlets to different ports.
> >
> >
> > Hi Mel,
> > If you are interested in an approach to getting Tomcat to serve
> > apps on multiple ports, you might want to check out the
> > Enhydra Enterprise 4.0 source.
> > We create multiple ContextManagers, where each ContextManager
> > handles the group of apps running on a particular connection (port).
> > This is currently using Tomcat 3.2.1.
> > Shawn
> >
> > Mel Martinez wrote:
> >
> > > --- Uijin Hong <[EMAIL PROTECTED]> wrote:
> > > > Why don't you just run 2 servlet container(Tomcat)s
> > > > for each port?
> > > >
> > >
> > > That could get memory expensive if you have to do this
> > > for several ports.
> > >
> > > The best performance scenario might be to use Apache
> > > to listen to several ports and rewrite them to go to a
> > > single tomcat 'delegator' servlet which then
> > > dispatches them to servlets/JSPs appropriately.  And
> > > actually, you should just use apache rewrites directly
> > > to dispatch to any static resources.
> > >
> > > Mel
> > >
> > > > -----Original Message-----
> > > > From: William Wishon
> > > > [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, March 06, 2001 9:27 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Assigning Servlets to different ports.
> > > >
> > > >
> > > > Hi,
> > > >
> > > > <snipped>
> > > >
> > > > An example of what I'm trying to do is to have a GET
> > > > on "/" of port 8080
> > > > return webapps/app1/index.html and a GET of "/" on
> > > > port 8081 return
> > > > webapps/app2/index.html.
> > > >
> > > > Thanks,
> > > > Bill
> > > >
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, email:
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > [EMAIL PROTECTED]
> > > > For additional commands, email:
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get email at your own domain with Yahoo! Mail.
> > > http://personal.mail.yahoo.com/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, email: [EMAIL PROTECTED]
> >
> > --
> > Shawn McMurdo              mailto:[EMAIL PROTECTED]
> > Lutris Technologies        http://www.lutris.com
> > Enhydra.Org                http://www.enhydra.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to