Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 111 invoked from network); 8 Nov 1999 21:11:33 -0000 Received: from mercury.sun.com (192.9.25.1) by apache.org with SMTP; 8 Nov 1999 21:11:33 -0000 Received: from engmail3.Eng.Sun.COM ([129.144.170.5]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id NAA11898 for ; Mon, 8 Nov 1999 13:10:32 -0800 (PST) From: costin@eng.sun.com Received: from eng.sun.com (costin.Eng.Sun.COM [129.144.251.103]) by engmail3.Eng.Sun.COM (8.9.1b+Sun/8.9.1/ENSMAIL,v1.6) with ESMTP id NAA14750 for ; Mon, 8 Nov 1999 13:10:31 -0800 (PST) Sender: costin@engmail3.Eng.Sun.COM Message-ID: <38273D59.DDC9F2A5@eng.sun.com> Date: Mon, 08 Nov 1999 21:15:05 +0000 X-Mailer: Mozilla 4.51 [en] (X11; U; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Re: Connector -- Context Manager relation References: <3824AA3D.B3F1C87C@interdata.com.pl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Just wanted to ask - why connector is attached to context manager, not > to server? It is potential source of problems in case someone wants to > make his tomcat to serve for several vhosts. ContextManager is the main "entry point" in the servlet engine. Adapters will construct a Request/Response and call ContextManager.service. ( for request processing ). ContextManager should be a "singleton". One "Context" can have multiple "Connectors" ( i.e. you can access the same application via multiple protocols ). One Connector can serve multiple Contexts. Right now this is not implemented completely - and I don't see it as a big priority ( compared with other features, testing of the model, etc). > Normally he would probably use just one address:port to attach it to > apache. However what happens if he configure two contexts with exactly > the same connector? Supposedly he will get unable-to-bind exception, > right? I don't think so - there is one ContextManager, it has several Connectors ( each using different ports ). You should be able to set a Context to use a certain connector ( the current code allows all connectors to see all Contexts ). > IMHO, connectors should belong to ... The relation between the > connector and the context manager is based on the vhost, which is > calculated during request processing phase, so it's not wise to assume > this relation earlier. "server" means too many things, I prefer ContextManager ( implements Server ) :-) There is no relation between Connector/Adapter and vhost - ContextManager will extract the local address and host header and do the routing ( eventualy using hints from RequestAdapter if the adapter already knows the vhost or the context id ) Costin