karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: Using config admin to configure jetty (or tomcat?)
Date Wed, 19 Aug 2015 20:38:13 GMT
Hi Benson,

yes as I already mentioned you can also use a jetty.xml [1] to configure
the container in addition to the configurations through config-admin
service.
Pax Web is a mediation layer, on top of Jetty, Tomcat and Undertow.
The jetty.xml you reference to is from the org.eclipse Jetty Project.

Regarding your second question, about how to connect to a Karaf run inside
Docker.
This depends if you expose the jmx port from inside of the docker container
to the outside.
As I don't know about your Docker container for Karaf and how you
configured it, it's hard to tell.

If you exposed your jmx port, just follow the description in the manual.

regards, Achim

[1] -
http://ops4j.github.io/pax/web/SNAPSHOT/index.html#_advanced_jetty_configuration

2015-08-19 22:18 GMT+02:00 Benson Margulies <benson@basistech.com>:

> Achim, the page I linked is from the latest karaf doc, and claims to
> be the default jetty.xml included in 'WebContainer', which I am
> supposing is pax-web.
>
> However, I looked in the repo for pax-web, and can't find a jetty.xml
> that looks like that. Or that defined a thread pool at all.
>
> I think I'll try to use the 868 new parameters.
>
> Meanwhile, have you ever managed to get jvisualvm connected to karaf
> in a docker container? All I want to do is see how many threads ...
>
> On Wed, Aug 19, 2015 at 4:07 PM, Achim Nierbeck <bcanhome@googlemail.com>
> wrote:
> > Hi Benson,
> >
> > I'm not sure I follow, but on the karaf manual page is no such
> > configuration.
> > With Pax-Web Jetty it's possible to have also the std. jetty.xml
> > configurations.
> >
> > since PAXWEB-868 it's also possible to use configurations via config
> admin.
> >
> > regards, Achim
> >
> >
> > 2015-08-19 21:58 GMT+02:00 Benson Margulies <benson@basistech.com>:
> >>
> >> So, there's
> >> https://karaf.apache.org/manual/latest/users-guide/webcontainer.html,
> >> which shows a jetty.xml with an 'acceptors' parameter, not a min and
> >> max threads. Is that page obsolete, or more up to date than the page
> >> that led me towards:
> >>
> >> <Configure id="Server" class="org.eclipse.jetty.server.Server">
> >>     <!-- How many threads do we want? How do we want to control load
> >> on an instance? -->
> >>     <Get name="ThreadPool">
> >>         <Set name="minThreads" type="int">10</Set>
> >>         <Set name="maxThreads" type="int">200</Set>
> >>         <Set name="idleTimeout" type="int">60000</Set>
> >>         <Set name="detailedDump">false</Set>
> >>     </Get>
> >> </Configure>
> >>
> >>
> >> On Tue, Aug 18, 2015 at 3:06 PM, Achim Nierbeck <
> bcanhome@googlemail.com>
> >> wrote:
> >> > no, it will work for both servers, it's just undertow that works
> >> > differently.
> >> >
> >> > regards, Achim
> >> >
> >> > 2015-08-18 21:03 GMT+02:00 Benson Margulies <benson@basistech.com>:
> >> >>
> >> >> OK, so if I pull in tomcat, I can configure the thread pool size with
> >> >> config admin, but if I stick to Jetty, I am stuck to XML.
> >> >>
> >> >>
> >> >> On Tue, Aug 18, 2015 at 2:52 PM, Achim Nierbeck
> >> >> <bcanhome@googlemail.com>
> >> >> wrote:
> >> >> > Hi Benson,
> >> >> >
> >> >> > in the manual [1] you can see the configurable properties.
> >> >> > And we also had some improvement for configuring threads for the
> http
> >> >> > service with 6 an 4.2 [2].
> >> >> >
> >> >> > regards, Achim
> >> >> >
> >> >> > [1] -
> >> >> >
> >> >> >
> >> >> >
> http://ops4j.github.io/pax/web/SNAPSHOT/index.html#Configuration-ConfigurationviaOSGiConfigurationAdminService
> >> >> > [2] - https://ops4j1.jira.com/browse/PAXWEB-868
> >> >> >
> >> >> > 2015-08-18 19:06 GMT+02:00 Benson Margulies <benson@basistech.com
> >:
> >> >> >>
> >> >> >> I am wishing to use config admin, rather than messing around
with
> >> >> >> entire XML files in the file system or in bundles, to configure
> the
> >> >> >> number of worker threads for the HTTP service. Is there a
way?
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> >
> >> >> > 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
> >> >> >
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> >
> >> > 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
> >> >
> >
> >
> >
> >
> > --
> >
> > 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
> >
>



-- 

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

Mime
View raw message