Hi Mark, thanks for the pointer I think I've found the reason. Could it be that the initialization of the servlets changed from 7 to 8 :) I used to load the servlet in the initialization phase. So that's the part I need to alter. Need to move that part to the loadOnStartup method call.
just in case anyone is interested, I've linked the source in question below [1]. regards, Achim [1] - 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#L273 2014-10-15 13:26 GMT+02:00 Mark Thomas <ma...@apache.org>: > On 15/10/2014 11:38, Achim Nierbeck wrote: > > Hi Johan, > > > > 2014-10-15 12:22 GMT+02:00 Johan Compagner <jcompag...@servoy.com>: > > > >> yes we tried to go that way with whiteboard registration also (jetty is > >> shipped by default in eclipse also with that) > >> but that was way to hard to control and to really configure the way we > want > >> so we decided to make tomcat a full osgi package itself. > >> > > > > even though I hate to do advertising ... :) > > Might be interested in the way Pax Web works then ;) > > > > still, does anyone know why the children, containing also the Servlets, > are > > started before the ServletContainerInitializers and/or > > what am I doing wrong. Most likely my assumption is wrong but I couldn't > > spot which one. > > I somehow fear that while registering the Wrapper I'm doing something > > wrong. > > Put a break point on StandardWrapper.startInternal() and see what the > call stack is at that point. > > Mark > > > > > > regards, Achim > > > > > > > > > >> On 15 October 2014 12:13, Achim Nierbeck <bcanh...@googlemail.com> > wrote: > >> > >>> 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 <jcompag...@servoy.com>: > >>> > >>>> 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 <bcanh...@googlemail.com> > >>> 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 <http://karaf.apache.org/> Committer & PMC > >>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> > >>> Committer > >>>> & > >>>>> Project Lead > >>>>> blog <http://notizblog.nierbeck.de/> > >>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > >>>>> > >>>>> Software Architect / Project Manager / Scrum Master > >>>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> Johan Compagner > >>>> Servoy > >>>> > >>> > >>> > >>> > >>> -- > >>> > >>> Apache Member > >>> Apache Karaf <http://karaf.apache.org/> Committer & PMC > >>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> > Committer > >> & > >>> Project Lead > >>> blog <http://notizblog.nierbeck.de/> > >>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > >>> > >>> Software Architect / Project Manager / Scrum Master > >>> > >> > >> > >> > >> -- > >> Johan Compagner > >> Servoy > >> > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master