Hi Stephan, see my comments inline :-)
regards, Achim 2017-03-03 14:51 GMT+01:00 Stephan Siano <[email protected]>: > Hi, > > I am working on [PAXWEB-630] Interpret and use the tomcat-server.xml. > While doing so, I came across an interesting problem. > > The tomcat-server.xml can configure host entries (and this does make > sense, since that allows to add additional configurations like valves to > the host). > > However, after the config file parsing the mergeConfiguration() method of > EmbeddedTomcat will change the name of the host configured with the > EmbeddedTomcatInstance to the first listeningAddress in the configuration > (and will add new hosts to the engine configured at the engine attribute of > the EmbeddedTomcatInstance). The first host will be set as defaultHost to > the engine. Does that really make sense? If I understand the jetty coding > correctly they try to match the listeningAddresses from the configuration > with those from the configration file (and add the missing ones). Wouldn't > that make more sense or is there a reason why the mechanism is as it is > (except that it is easier to implement that way)? > > AFAICR when I created a first shot for this, I basically moved the way it's handled with jetty to tomcat. But what you describe here, that sounds more like a bug, cause the way it's handled for jetty is the way it's supposed to be. > For the connectors the org.osgi.service.http.enabled and > org.osgi.service.https.enabled properties take precedence over everything > else (if they are set to false, all http or https connectors are removed). > Aside from that a connector for org.osgi.service.http.port and > org.osgi.service.https.port is added if it does not already exist in the > config file. I would guess that makes sense. > > > Can you explain how the merge behaviour of the hosts is supposed to be? > The idea behind this is A) osgi properties are always master B) external jetty or tomcat configurations are always add-ons as we're running in an OSGi env, the OSGi spec rules for the configuration, external configurations are an "add-on" from Pax-Web. Therefore if there is a configuration available from an native configuration which collides with the "default" configuration coming from the osgi properties, the Host configuration from the OSGi properties rules. All other configurations are add-ons. > > Are my assumptions about the connectors correct? > > Best regards > Stephan > > -- > -- > ------------------ > OPS4J - http://www.ops4j.org - [email protected] > > --- > You received this message because you are subscribed to the Google Groups > "OPS4J" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
