You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Achim Nierbeck <bc...@googlemail.com> on 2011/05/04 00:20:29 UTC

Re: Jetty + JMX in Karaf 2.2.0

Hi Mike,

one proper way of getting to know how Jetty needs to be configured is to
try this with  a vanilla Jetty Server.
What kind of configuration is needed to get this working on the std.
Jetty. After that you can port those
requirements into the cfg for pax-web/jetty.

Regards, Achim


> I'm currently running Karaf 2.2.0 with Pax-Web 0.8.0, and have been unable to
> get JMX monitoring of Jetty running inside of Karaf.  Below is the contents
> of my ./etc/jetty.xml document.  Could someone let me know what I'm doing
> wrong?
>
> <?xml version="1.0"?>
> &lt;!DOCTYPE Configure PUBLIC &quot;-//Mort Bay Consulting//
> DTD Configure//EN&quot;
> &quot;http://jetty.mortbay.org/configure.dtd&quot;&gt;
>
> <Configure class="org.eclipse.jetty.server.Server">
>
>     
>     
>     
>
>     <Call name="addConnector">
>       <Arg>
>           <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
>             <Set name="host"><Property name="jetty.host" /></Set>
> 			
>             <Set name="port"><Property name="jetty.port"
> default="8080"/></Set>
>             <Set name="maxIdleTime">300000</Set>
>             <Set name="Acceptors">2</Set>
>             <Set name="statsOn">false</Set>
>             <Set name="confidentialPort">8443</Set>
>             <Set name="lowResourcesConnections">20000</Set>
>             <Set name="lowResourcesMaxIdleTime">5000</Set>
>           </New>
>       </Arg>
>     </Call>	
> 	
>     
>     
>     
> 	<Call id="MBeanServer" class="java.lang.management.ManagementFactory"
> name="getPlatformBeanServer"/>
> 	
> 	<New id="MBeanContainer" class="org.eclipse.jetty.jmx.MBeanContainer">
> 		<Arg>
> 			<Ref id="MBeanServer"/>
> 		</Arg>
> 	</New>
> 	
> 	<Get id="Container" name="container">
> 		<Call name="addEventListener">
> 			<Ref id="MBeanContainer"/>
> 		</Call>
> 	</Get>	
> </Configure>
> -----Mike Van (aka karafman)
> Karaf Team (Contributor)--
> View this message in context: http://karaf.922171.n3.nabble.com/Jetty-JMX-in-Karaf-2-2-0-tp2881560p2881560.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Jetty + JMX in Karaf 2.2.0

Posted by Achim Nierbeck <bc...@googlemail.com>.
After thinking about this issue a bit more I'm unsure if altering the
jetty.xml
does really do the trick. So let's get back to your initial intention.

You are trying to use mbeans in a war archive.
Well right now it should be really straight forward to use mbeans in a
regular
bundle. Did that before with Camel and works.
In a project I work on I was able to connect to the MBeanServer out of
an servlet
by calling ManagementFactory.getPlatformMBeanServer().
So to verify I'd suggest you write a little mockup servlet enable it to
use the
standard Karaf MBeanServer with is enabled by default and try to get
information
about that servlet through your jconsole.

Regards, Achim

Am 04.05.2011 22:24, schrieb Achim Nierbeck:
> it should work right away on trunk
>
> Am 04.05.2011 22:18, schrieb mikevan:
>> I did that, removed all the jmx stuff from the above jetty.xml file, and
>> jetty failed to start up (inside Karaf).  I'll do what you suggested,
>> but
>> that jetty.xml configuration was copied from the trunk jetty.xml file in
>> Karaf.  Is Jetty on the Karaf trunk starting properly?
>>
>> -----
>> Mike Van (aka karafman)
>> Karaf Team (Contributor)
>> -- 
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Jetty-JMX-in-Karaf-2-2-0-tp2881560p2900620.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>


Re: Jetty + JMX in Karaf 2.2.0

Posted by Achim Nierbeck <bc...@googlemail.com>.
it should work right away on trunk

Am 04.05.2011 22:18, schrieb mikevan:
> I did that, removed all the jmx stuff from the above jetty.xml file, and
> jetty failed to start up (inside Karaf).  I'll do what you suggested, but
> that jetty.xml configuration was copied from the trunk jetty.xml file in
> Karaf.  Is Jetty on the Karaf trunk starting properly?
>
> -----
> Mike Van (aka karafman)
> Karaf Team (Contributor)
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Jetty-JMX-in-Karaf-2-2-0-tp2881560p2900620.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Jetty + JMX in Karaf 2.2.0

Posted by mikevan <mv...@comcast.net>.
I did that, removed all the jmx stuff from the above jetty.xml file, and
jetty failed to start up (inside Karaf).  I'll do what you suggested, but
that jetty.xml configuration was copied from the trunk jetty.xml file in
Karaf.  Is Jetty on the Karaf trunk starting properly?

-----
Mike Van (aka karafman)
Karaf Team (Contributor)
--
View this message in context: http://karaf.922171.n3.nabble.com/Jetty-JMX-in-Karaf-2-2-0-tp2881560p2900620.html
Sent from the Karaf - User mailing list archive at Nabble.com.