{"id":25817,"date":"2015-08-06T11:00:05","date_gmt":"2015-08-06T08:00:05","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=25817"},"modified":"2019-04-10T13:11:48","modified_gmt":"2019-04-10T10:11:48","slug":"jetty-jmx-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/","title":{"rendered":"Jetty JMX Example"},"content":{"rendered":"<p>JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Jetty itself does not provide a GUI based console for management\/monitoring, however ii presents a solid integration with JMX, which enables us to monitor\/manage Servers through JMX.<\/p>\n<p>In this post we are going to discuss JMX integration of Jetty. We will start with an Embedded Jetty example. We will first configure our embedded server to be accessible through JMX; thereafter we are going to incorporate Managed Objects in Jetty style. After the embedded example, we are going to show how we can enable JMX in a standalone Jetty Server. During the example, we are going to monitor and administer our Jetty through JConsole.<\/p>\n<p>In Jetty, the main constructs such as handlers and holders are also JMX beans. This makes almost every single piece of Jetty observable or controllable through JMX. In addition this, Jetty enables creation of JMX objects(MBeans) through annotations(which is an extension to standard MBean capabilities).\n<\/p>\n<h2>1. Environment<\/h2>\n<p>In the example, following environment will be used:<\/p>\n<ul>\n<li>Java 8 (Java 7 is also OK.)<\/li>\n<li>Maven 3.x.y<\/li>\n<li>Eclipse Luna(as the IDE)<\/li>\n<li>Jetty v9.2.11 (In Embedded Jetty example, we will add Jetty libraries through Maven.)<\/li>\n<li>JConsole(which is already bundled with your Java)<\/li>\n<\/ul>\n<h2>2. JMX with Embedded Jetty<\/h2>\n<h3>2.1 Structure of the Example<\/h3>\n<p>In this example, we are going to enable Jetty for an Embedded Jetty Server programmatically. Our embedded server will have a deployed simple application with a simple servlet. Thereafter we are going to implement Managed Object with Jetty annotations. The Maven project will be packaged as a WAR; so that it can be deployed also on a standalone &nbsp;server.<\/p>\n<h3>2.2 Creating the Maven Project<\/h3>\n<p>We will create the Maven project in Eclipse, applying the steps below:<\/p>\n<ol>\n<li>Go to File -&gt; New -&gt;Other -&gt; Maven Project<\/li>\n<li>Tick Create a simple project and press \u201cNext\u201d.<\/li>\n<li>Enter groupId as : com.javacodegeeks.snippets.enterprise<\/li>\n<li>Enter artifactId as : jetty-jmx-example<\/li>\n<li>Select packaging as \u201cwar\u201d.<\/li>\n<li>Press \u201cFinish\u201d.<\/li>\n<\/ol>\n<p>After creating our project, we are going to add following dependencies to our <i>pom.xml<\/i>.<\/p>\n<ul>\n<li>org.eclipse.jetty:jetty-server<\/li>\n<li>org.eclipse.jetty:jetty-webapp<\/li>\n<li>org.eclipse.jetty:jetty-jmx<\/li>\n<\/ul>\n<p>The first two dependencies are common for almost all embedded Jetty applications. The third one(<i>jetty-jmx<\/i>) enables us to integrate Jetty with JMX. After adding the dependencies, the dependency section of our<i> pom.xml <\/i>seems as follows:<\/p>\n<pre class=\"brush:xml\">&lt;dependencies&gt;\n\t\t&lt;!--Jetty dependencies start here --&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.eclipse.jetty&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;jetty-server&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;9.2.11.v20150529&lt;\/version&gt;\n\t\t&lt;\/dependency&gt;\n\n\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.eclipse.jetty&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;jetty-webapp&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;9.2.11.v20150529&lt;\/version&gt;\n\t\t&lt;\/dependency&gt;\n\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.eclipse.jetty&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;jetty-jmx&lt;\/artifactId&gt;\n\t\t\t&lt;version&gt;9.2.11.v20150529&lt;\/version&gt;\n\t\t&lt;\/dependency&gt;\n\n\t\t&lt;!--Jetty dependencies end here --&gt;\n\n&lt;\/dependencies&gt;\n<\/pre>\n<h3>2.3 Enabling JMX Programmatically<\/h3>\n<p>In order to keep things simple, we are going to implement our Jetty Server through our Main class of the project. You can see the <i>JettyJmxExampleMain<\/i> class below, decorated with source code comments.<\/p>\n<p><span style=\"text-decoration: underline\"><em>JettyJmxExampleMain.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.snippets.enterprise.jettyjmx;\n\nimport java.lang.management.ManagementFactory;\n\nimport org.eclipse.jetty.jmx.MBeanContainer;\nimport org.eclipse.jetty.server.Server;\nimport org.eclipse.jetty.util.log.Log;\nimport org.eclipse.jetty.webapp.WebAppContext;\n\npublic class JettyJmxExampleMain {\n\n\tpublic static void main(String[] args) throws Exception {\n\n\t\t\/\/ 1. Creating the server on port 8080\n\t\tServer server = new Server(8080);\n\n\t\t\/\/ 2. Creating the WebAppContext for the created content\n\t\tWebAppContext ctx = new WebAppContext();\n\t\tctx.setResourceBase(\"src\/main\/webapp\");\n\t\tserver.setHandler(ctx);\n\n\t\t\/\/ 3. CreatingManaged Managed Bean container\n\t\tMBeanContainer mbContainer = new MBeanContainer(ManagementFactory.getPlatformMBeanServer());\n\n\t\t\/\/ 4. Adding Managed Bean container to the server as an Event Listener  and Bean\n\t\tserver.addEventListener(mbContainer);\n\t\tserver.addBean(mbContainer);\n\n\t\t\/\/ 5. Adding Log\n\t\tserver.addBean(Log.getLog());\n\t\t\/\/ 6. Starting the Server\n\t\tserver.start();\n\t\tserver.join();\n\n\t}\n}\n\n\n<\/pre>\n<p>In the first steps (1 and 2), we initialize a Jetty Server with a Web Application context under <i>src\/main\/resources\/webapp<\/i>. In this part, nothing is special in terms of JMX integration. The web application in this example consists of a trivial Servlet, details of which will be provided later.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>In Step 3, we create our Managed Bean container. This container holds reference to the JMX Managed objects. In step 4, we attach this container to our Server. In the later steps (5 and 6), we add logging capability and start our server.<\/p>\n<p>As mentioned above, the web application we deployed on our embedded Server is simple. It consists of a single servlet (<i>JCGServlet<\/i>) that increments a counter on each request. The counter is encapsulated in a singleton object. The content of the <i>web.xml<\/i>, <i>JCGServlet<\/i> and <i>CounterSingleton<\/i> are presented below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>web.xml<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;web-app xmlns=\"http:\/\/java.sun.com\/xml\/ns\/javaee\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n\txsi:schemaLocation=\"http:\/\/java.sun.com\/xml\/ns\/javaee \n\t      http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_3_0.xsd\"\n\tversion=\"3.0\"&gt;\n\n\t&lt;display-name&gt;Jetty JMX Configuration Example&lt;\/display-name&gt;\n\n\n\t&lt;servlet&gt;\n\t\t&lt;servlet-name&gt;JCGServlet&lt;\/servlet-name&gt;\n\t\t&lt;servlet-class&gt;com.javacodegeeks.snippets.enterprise.jettyjmx.JCGServlet&lt;\/servlet-class&gt;\n\t&lt;\/servlet&gt;\n\n\t&lt;servlet-mapping&gt;\n\t\t&lt;servlet-name&gt;JCGServlet&lt;\/servlet-name&gt;\n\t\t&lt;url-pattern&gt;\/jcg\/*&lt;\/url-pattern&gt;\n\t&lt;\/servlet-mapping&gt;\n\n\n&lt;\/web-app&gt;\n<\/pre>\n<p><span style=\"text-decoration: underline\"><em>JCGServlet.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.snippets.enterprise.jettyjmx;\n\nimport java.io.IOException;\n\nimport javax.servlet.ServletException;\nimport javax.servlet.ServletRequest;\nimport javax.servlet.ServletResponse;\nimport javax.servlet.http.HttpServlet;\n\n\npublic class JCGServlet extends HttpServlet {\n\n\n\t@Override\n\tpublic void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {\n\n\t\tCounterSingleton.getInstance().increment();\n\n\t\tres.getOutputStream().print(\"Application Specific Servlet Response\");\n\n\t}\n\t\n}\n\n<\/pre>\n<p><span style=\"text-decoration: underline\"><em>CounterSingleton.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.snippets.enterprise.jettyjmx;\n\npublic class CounterSingleton {\n\n\tprivate static CounterSingleton instance = new CounterSingleton();\n\n\tprivate Integer counter = 0;\n\n\tprivate CounterSingleton() {\n\t\tcounter = 0;\n\t}\n\n\tpublic static CounterSingleton getInstance() {\n\t\treturn instance;\n\t}\n\n\tpublic synchronized void increment() {\n\t\tcounter++;\n\t}\n\n\tpublic Integer getCounter() {\n\t\treturn counter;\n\t}\n\t\n\tpublic synchronized void reset(){\n\t\tcounter=0;\n\t}\n\n}\n\n<\/pre>\n<p>When we start our application, our application is ready to be monitored and managed through JMX. We can verify that our web application and server are&nbsp;running by navigating to <a href=\"http:\/\/localhost:8080\/jcg\">http:\/\/localhost:8080\/jcg<\/a>&nbsp;with our browser&nbsp;and seeing the response below:<\/p>\n<p><figure id=\"attachment_25826\" aria-describedby=\"caption-attachment-25826\" style=\"width: 786px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-25826\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx1.jpg\" alt=\"Sample Servlet Response\" width=\"786\" height=\"443\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx1.jpg 786w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx1-300x169.jpg 300w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><\/a><figcaption id=\"caption-attachment-25826\" class=\"wp-caption-text\">Sample Servlet Response<\/figcaption><\/figure><\/p>\n<h3>2.4 Monitoring with JConsole<\/h3>\n<p>We can monitor our JMX enabled embedded server using JConsole, which is available under JAVA_HOME of our system. When we launch JConsole, it shows as a list of available local processes as in the figure below:[ulp id=&#8217;xFHGZUmgemwCMrAR&#8217;]<\/p>\n<p><figure id=\"attachment_25827\" aria-describedby=\"caption-attachment-25827\" style=\"width: 722px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-25827\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx2.jpg\" alt=\"JConsole Initial Screen\" width=\"722\" height=\"660\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx2.jpg 722w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx2-300x274.jpg 300w\" sizes=\"(max-width: 722px) 100vw, 722px\" \/><\/a><figcaption id=\"caption-attachment-25827\" class=\"wp-caption-text\">JConsole Initial Screen<\/figcaption><\/figure><\/p>\n<p>Here our embedded server is listed with name of the main class. When we select this process and proceed, we can see various parameters(memory,CPU, thread utilization etc) related to our Jetty. The screen presents 6 tabs for JMX administration. When we select MBean tab, the available Managed Beans are listed in a tree, which can be viewed below:<\/p>\n<p><figure id=\"attachment_25830\" aria-describedby=\"caption-attachment-25830\" style=\"width: 723px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx3.jpg\"><img decoding=\"async\" class=\"size-full wp-image-25830\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx3.jpg\" alt=\"Managed Bean Tree\" width=\"723\" height=\"567\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx3.jpg 723w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jmx3-300x235.jpg 300w\" sizes=\"(max-width: 723px) 100vw, 723px\" \/><\/a><figcaption id=\"caption-attachment-25830\" class=\"wp-caption-text\">Managed Bean Tree<\/figcaption><\/figure><\/p>\n<p>We can expand the tree <i>org.eclipse.jetty.webapp-&gt;webappcontext-&gt;ROOT-&gt;0<\/i>. This node shows a list parameters to be monitored under <i>Attributes<\/i> and a set of operations that can be invoked under <i>Operations <\/i>sections. Among these operations, we can stop the application invoking <i>stop()<\/i> method. When we call this operation, the webapp will immediately stop and will return 404 error when we try to access. We can restart our web application invoking the<i> start() <\/i>method.<\/p>\n<p>In addition to these, JConsole enables us various monitoring and administration options. Forcing a Garbage Collection or setting web application initialization parameters are among those&nbsp;options.<\/p>\n<h3>2.5 Jetty Managed Objects<\/h3>\n<p>As mentioned in the previous sections, Jetty enables us to create our Managed Beans using Jetty annotations. It is worth to mention three annotations here:<\/p>\n<ul>\n<li>@ManagedObject: This annotation is used for annotating managed object classes.<\/li>\n<li>@ManagedAttribute: This annotation denotes the getter fields that are listed under <i>Attributes<\/i> section,<\/li>\n<li>@ManagedOperation: This annotation denotes the methods to be listed under <i>Operations<\/i> section.<\/li>\n<\/ul>\n<p>Here you can see an example Managed object named <i>JCGManagedObject<\/i>. This class simply returns our previously mentioned counter and provides an operation to reset the counter.<\/p>\n<p><span style=\"text-decoration: underline\"><em>JCGManagedObject.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.snippets.enterprise.jettyjmx;\n\nimport org.eclipse.jetty.util.annotation.ManagedAttribute;\nimport org.eclipse.jetty.util.annotation.ManagedObject;\nimport org.eclipse.jetty.util.annotation.ManagedOperation;\n\n@ManagedObject(\"jcgManagedObject\")\npublic class JCGManagedObject {\n\n\t\n\t@ManagedAttribute \n\tpublic Integer getCount() {\n\t\t return CounterSingleton.getInstance().getCounter();\n\t }\n\t \n\n\t @ManagedOperation\n\t public void reset() {\n\t\t CounterSingleton.getInstance().reset();\n\t }\n}\n\n<\/pre>\n<p>Our managed bean can be wired to Jetty through adding&nbsp;the highlighted code below(Line 4) in the main:<\/p>\n<pre class=\"brush:java;highlight:[4]\">\/\/ 4. Adding Managed Bean container to the server as an Event Listener and Bean\nserver.addEventListener(mbContainer);\nserver.addBean(mbContainer);\nserver.addBean(new JCGManagedObject());\n<\/pre>\n<p>Here we have created an instance of our managed object and added as a bean. When we restart our application and open JConsole, we can see our managed bean in the MBeans tab under<i> com.javacodegeeks.snippets.enterprise.jettyjmx-&gt;jcgmanagedobject-&gt;0<\/i>. Here we can see our counter, which is incremented at each request, as an attribute, and we can reset this counter invoking&nbsp;the <em>reset()<\/em> under the <em>Operations<\/em> section:<\/p>\n<p><figure id=\"attachment_25834\" aria-describedby=\"caption-attachment-25834\" style=\"width: 872px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jcg4.jpg\"><img decoding=\"async\" class=\"size-full wp-image-25834\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jcg4.jpg\" alt=\"JCG Managed Object\" width=\"872\" height=\"688\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jcg4.jpg 872w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jcg4-300x237.jpg 300w\" sizes=\"(max-width: 872px) 100vw, 872px\" \/><\/a><figcaption id=\"caption-attachment-25834\" class=\"wp-caption-text\">JCG Managed Object<\/figcaption><\/figure><\/p>\n<h2>3. JMX with Standalone Jetty<\/h2>\n<p>To this point, we have discussed how we can integrate JMX to embedded Jetty, now we are going to enable JMX for standalone mode. Jetty presents a modular architecture which also includes JMX integration a a module. Related configuration is stored under <i>JETTY_HOME\/etc\/jetty-jmx.xml<\/i>. This configuration is almost equal to our programmatic configuration in the embedded mode. All we have to do is enabling jmx module. The related steps are as simple as below:<\/p>\n<ol>\n<li>Open start.ini under JETTY_HOME<\/li>\n<li>Add this line: <i>&#8211;module=jmx-remote<\/i><\/li>\n<li>Save and close the file.<\/li>\n<\/ol>\n<p>When we run our standalone Jetty, Jetty will start with JMX enabled. We can access our server through JConsole and manage it as in the embedded mode.<\/p>\n<h2>4. Conclusion<\/h2>\n<p>Jetty provides powerful administration and monitoring capabilities through JMX. In this example, we have skimmed through Jetty JMX integration for embedded and standalone modes. In addition to this, we have created a Managed Object which is implemented in Jetty style.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/08\/jetty-jmx-example.zip\"><strong>Jetty JMX Example<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Jetty itself does not provide a GUI based console for management\/monitoring, however ii presents a solid integration with JMX, which enables us to monitor\/manage Servers through JMX. In this post we are going to discuss JMX integration of Jetty. &hellip;<\/p>\n","protected":false},"author":54,"featured_media":1239,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[1027],"class_list":["post-25817","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jetty","tag-jmx"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Jetty JMX Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Jetty itself does not provide a GUI\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Jetty JMX Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Jetty itself does not provide a GUI\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-06T08:00:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-10T10:11:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ibrahim Tasyurt\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@itasyurt\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ibrahim Tasyurt\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/\"},\"author\":{\"name\":\"Ibrahim Tasyurt\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/b2b2c4a3762c4d2e0072b831fb6900f5\"},\"headline\":\"Jetty JMX Example\",\"datePublished\":\"2015-08-06T08:00:05+00:00\",\"dateModified\":\"2019-04-10T10:11:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/\"},\"wordCount\":1231,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg\",\"keywords\":[\"jmx\"],\"articleSection\":[\"jetty\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/\",\"name\":\"Jetty JMX Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg\",\"datePublished\":\"2015-08-06T08:00:05+00:00\",\"dateModified\":\"2019-04-10T10:11:48+00:00\",\"description\":\"JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Jetty itself does not provide a GUI\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jetty\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/jetty\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Jetty JMX Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/b2b2c4a3762c4d2e0072b831fb6900f5\",\"name\":\"Ibrahim Tasyurt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/06\/Ibrahim-Tasyurt-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/06\/Ibrahim-Tasyurt-96x96.jpg\",\"caption\":\"Ibrahim Tasyurt\"},\"description\":\"Ibrahim is a Senior Software Engineer residing in Ankara,Turkey. He holds BSc and MS degrees in Computer Engineering from Middle East Technical University(METU). Throughout his professional carrier, he has worked in Enterprise Web Application projects for public sector and telecommunications domains. Java EE, Web Services and Enterprise Application Integration are the areas he is primarily involved with.\",\"sameAs\":[\"http:\/\/www.javacodegeeks.com\/\",\"https:\/\/x.com\/itasyurt\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/ibrahim-tasyurt\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Jetty JMX Example - Java Code Geeks","description":"JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Jetty itself does not provide a GUI","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/","og_locale":"en_US","og_type":"article","og_title":"Jetty JMX Example - Java Code Geeks","og_description":"JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Jetty itself does not provide a GUI","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2015-08-06T08:00:05+00:00","article_modified_time":"2019-04-10T10:11:48+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg","type":"image\/jpeg"}],"author":"Ibrahim Tasyurt","twitter_card":"summary_large_image","twitter_creator":"@itasyurt","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ibrahim Tasyurt","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/"},"author":{"name":"Ibrahim Tasyurt","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/b2b2c4a3762c4d2e0072b831fb6900f5"},"headline":"Jetty JMX Example","datePublished":"2015-08-06T08:00:05+00:00","dateModified":"2019-04-10T10:11:48+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/"},"wordCount":1231,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg","keywords":["jmx"],"articleSection":["jetty"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/","name":"Jetty JMX Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg","datePublished":"2015-08-06T08:00:05+00:00","dateModified":"2019-04-10T10:11:48+00:00","description":"JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. Jetty itself does not provide a GUI","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/codehaus-jetty-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jetty\/jetty-jmx-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/"},{"@type":"ListItem","position":4,"name":"jetty","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/jetty\/"},{"@type":"ListItem","position":5,"name":"Jetty JMX Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/b2b2c4a3762c4d2e0072b831fb6900f5","name":"Ibrahim Tasyurt","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/06\/Ibrahim-Tasyurt-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/06\/Ibrahim-Tasyurt-96x96.jpg","caption":"Ibrahim Tasyurt"},"description":"Ibrahim is a Senior Software Engineer residing in Ankara,Turkey. He holds BSc and MS degrees in Computer Engineering from Middle East Technical University(METU). Throughout his professional carrier, he has worked in Enterprise Web Application projects for public sector and telecommunications domains. Java EE, Web Services and Enterprise Application Integration are the areas he is primarily involved with.","sameAs":["http:\/\/www.javacodegeeks.com\/","https:\/\/x.com\/itasyurt"],"url":"https:\/\/examples.javacodegeeks.com\/author\/ibrahim-tasyurt\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/25817","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/54"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=25817"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/25817\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1239"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=25817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=25817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=25817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}