oh! Awesome! Yes - "_jetty" is an instance of 'org.eclipse.jetty.server.Server'.
Thanks a lot for the input! Vinay On Thu, Sep 12, 2013 at 5:23 PM, Joakim Erdfelt <[email protected]> wrote: > What is "_jetty" in this code sample? > > If it is an instance of > org.eclipse.jetty.server.Server<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/Server.html>, > then you can just cast that to > org.eclipse.jetty.util.component.Container<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/util/component/Container.html> > . > > The Server is the Container, and the relationship is like this on Jetty > 9... > > Server<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/Server.html> > extends > HandlerWrapper<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/handler/HandlerWrapper.html> > extends > AbstractHandlerContainer<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/handler/AbstractHandlerContainer.html> > extends > AbstractHandler<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/handler/AbstractHandler.html> > extends > ContainerLifeCycle<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/util/component/ContainerLifeCycle.html> > implements > Container<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/util/component/Container.html> > > Hope that helps. > > > -- > Joakim Erdfelt <[email protected]> > webtide.com <http://www.webtide.com/> - intalio.com/jetty > Expert advice, services and support from from the Jetty & CometD experts > eclipse.org/jetty - cometd.org > > > On Thu, Sep 12, 2013 at 5:07 PM, Vinay Pothnis <[email protected]>wrote: > >> This is what I am doing currently: >> >> ------------------------------ >> >> private final org.eclipse.jetty.server.Server _jetty; >> >> private MBeanContainer _jettyMBeanContainer; >> >> ... >> MBeanServer mBeanServer = >> ManagementFactory.getPlatformMBeanServer(); >> _jettyMBeanContainer = new MBeanContainer(mBeanServer); >> _jetty.getContainer().addEventListener(_jettyMBeanContainer); >> try { >> _jettyMBeanContainer.start(); >> } catch (Exception e) { >> throw new IllegalArgumentException("...some message >> here..."); >> } >> ... >> ------------------------------ >> >> Sorry for the poor formatting. >> >> >> On Thu, Sep 12, 2013 at 4:57 PM, Joakim Erdfelt <[email protected]>wrote: >> >>> Can you provide some example code on what you are doing currently? >>> >>> -- >>> Joakim Erdfelt <[email protected]> >>> webtide.com <http://www.webtide.com/> - intalio.com/jetty >>> Expert advice, services and support from from the Jetty & CometD experts >>> eclipse.org/jetty - cometd.org >>> >>> >>> On Thu, Sep 12, 2013 at 4:43 PM, Vinay Pothnis >>> <[email protected]>wrote: >>> >>>> Hello All, >>>> >>>> In Jetty 9 - we no longer can access the container via the Server. >>>> How do we do this in Jetty 9 - since I am using embedded Jetty and >>>> would like to enable JMX. >>>> >>>> The Jetty 9 documentation still seems to suggest the >>>> Server.getContainer() way - >>>> http://www.eclipse.org/jetty/documentation/current/jmx-chapter.html >>>> >>>> Thanks >>>> Vinay >>>> >>>> _______________________________________________ >>>> jetty-users mailing list >>>> [email protected] >>>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>>> >>>> >>> >>> _______________________________________________ >>> jetty-users mailing list >>> [email protected] >>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>> >>> >> >> _______________________________________________ >> jetty-users mailing list >> [email protected] >> https://dev.eclipse.org/mailman/listinfo/jetty-users >> >> > > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > >
_______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
