Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3603317DE9 for ; Wed, 15 Oct 2014 10:13:47 +0000 (UTC) Received: (qmail 23747 invoked by uid 500); 15 Oct 2014 10:13:41 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 23687 invoked by uid 500); 15 Oct 2014 10:13:41 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 23676 invoked by uid 99); 15 Oct 2014 10:13:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2014 10:13:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_DBL_ABUSE_REDIR,URIBL_DBL_REDIR X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bcanhome@googlemail.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-wg0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2014 10:13:37 +0000 Received: by mail-wg0-f52.google.com with SMTP id a1so954807wgh.23 for ; Wed, 15 Oct 2014 03:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iGE9qqfxj00xgmiuZcGJOheA1nyI5o/OPDGsTWItYys=; b=suwybDuPOKz5HY5Ja9GulxNhyag7TPc2rTJGqHSy6ZHrX4zH1/pmnZjTolITLlOLsY YKX+eEPwmRHy/3pYIqG7wQsersp/ft/wFcVZZYUlqtzcWpSgkFZoXFSyF5HyAQq3I6g/ M/pl91b5bGHmBkl+ACSoYLo6yhtk9Kd/ZQOySIR7U3r6HV9+EwC+upsIonESuZovVlMZ nIgvND/Uq07MhoPxAygoymeuVLIG7Y0D80aau4vgDrysHEuA3Ffv3FvkrKf4QrFAIqMK NQgoGroupdMYVLni1rUIrvn1eV8qU7B5HepgXAKCI0D6VjTL0BfHI08EI1v1OQmjSfXG PUrw== MIME-Version: 1.0 X-Received: by 10.194.23.104 with SMTP id l8mr10897873wjf.26.1413367996817; Wed, 15 Oct 2014 03:13:16 -0700 (PDT) Received: by 10.194.44.193 with HTTP; Wed, 15 Oct 2014 03:13:16 -0700 (PDT) In-Reply-To: References: Date: Wed, 15 Oct 2014 12:13:16 +0200 Message-ID: Subject: Re: Embedded Tomcat From: Achim Nierbeck To: Tomcat Users List Content-Type: multipart/alternative; boundary=047d7b41cdd0632b430505736147 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b41cdd0632b430505736147 Content-Type: text/plain; charset=UTF-8 Hi Johan, thanks for the pointer. To me it looks like it does have a different scope. Pax Web has been one of the first OSGi HttpService providers with additional support for Web Application Bundles (std. war with OSGi Manifest) This has been achieved so far very successfully with Jetty. Now we try to add additional Containers like Tomcat and Undertow. As for this Pax Web needs to be the one in control over registering Servlets etc. by either HttpService registration, Whiteboard registration or by using the bundle-extender approach. You could regard this to be a mediation layer between the OSGi Service Registry and the underlying web-container. regards, Achim 2014-10-15 11:46 GMT+02:00 Johan Compagner : > maybe you are interested in this one: > > https://github.com/Servoy/servoy-eclipse-tomcat > > thats also a osgi enabled tomcat (but the full tomcat) we use that one > right in eclipse, where other plugins just contribute filters and servlets > > > On 14 October 2014 23:56, Achim Nierbeck wrote: > > > Hi > > > > I'm currently working on integrating embedded tomcat in the OPS4j Pax Web > > OSGi container as alternativ underlying web container. Right now I'm > stuck > > on a certain point that is kind of hard to understand so I'm sure I'm > doing > > something "awfully" wrong :) > > > > So here is what I'm struggling with. > > Using Tomcat 8 embedded core > > While the context is started I eventually end up at [1] > > This is the point I don't get cause I'd expect Servlets to be started at > > [2], but obviously the Servlets are already started at [1]. Therefore the > > ServletContainerInitializers are never called [3]. > > > > Now my question, what am I doing wrong, as all servlets are registered as > > children. > > > > I'm very well aware that these questions might not really make a lot of > > sense, therefore you'll find the current implementation at [4]. > > > > regards, Achim > > > > [1] - > > > > > https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/core/StandardContext.java#L5098 > > > > [2] - > > > > > https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/core/StandardContext.java#L5229 > > [3] - > > > > > https://github.com/apache/tomcat/blob/trunk/java/org/apache/catalina/core/StandardContext.java#L5182 > > [4] - > > > > > https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-tomcat/src/main/java/org/ops4j/pax/web/service/tomcat/internal/TomcatServerWrapper.java#L342 > > > > > > -- > > > > Apache Member > > Apache Karaf Committer & PMC > > OPS4J Pax Web Committer > & > > Project Lead > > blog > > Co-Author of Apache Karaf Cookbook > > > > Software Architect / Project Manager / Scrum Master > > > > > > -- > Johan Compagner > Servoy > -- Apache Member Apache Karaf Committer & PMC OPS4J Pax Web Committer & Project Lead blog Co-Author of Apache Karaf Cookbook Software Architect / Project Manager / Scrum Master --047d7b41cdd0632b430505736147--