Apache Tomcat

Thursday September 16, 2010

Tomcat 7 trunk and JMX

You may have seen that the Tomcat project participated in the Google Summer of Code (GSOC) this year. This year, Chamith Buddhika has been working on improving the JMX support. In particular the aims were:

  • Aligning the attributes and methods exposed via JMX with reality. The JMX descriptions and the actual code had diverged over time and there were many missing entries as well as entries that no longer worked.
  • Making it possible to fully configure a Tomcat instance over JMX.

It is this second objective that I am writing about today. With the most recent changes to Tomcat 7 trunk (you'll need to build from svn or wait until 7.0.3 to use these features) it is now possible to start an absolute bare minimum Tomcat instance and perform all the configuration via JMX.

To try this out for yourself, you'll need to start with a standard Tomcat install (if building from trunk the contents of output/build will be fine) and reduce server.xml to the bare minimum. Something like this:

<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
</Server>
Then start Tomcat along with JConsole and connect JConsole to your newly started Tomcat instance. In the MBean tab in JConsole, you should see a number of Tomcat MBeans including one named "Catalina:type=MBeanFactory". Navigate to this MBean and use the "createStandardServiceEngine" method to create a Service and an Engine. There is a one-to-one mapping between Service and Engine so they are created together. For domain and defaultHost I use the standard values "Catalina" and "localhost" respectively. You can change these if you wish. baseDir must be the full path to CATALINA_BASE.

The next step is to add a Host to the Engine, configure the Host and start it. To add the Host, navigate to the Engine you just created and use the addChild operation. The type should be "org.apache.catalina.core.StandardHost" and the name must match the name you used for the defaultHost attribute when creating the Engine. The default configuration for the Host should allow you to start it, so navigate to the new Host element and use the start operation. You should see all the Contexts found in webapps being automatically deployed.

Finally, you need to add a Connector so you can test your configuration. Navigate to the Service element you created earlier and select the addConnector operation. If you don't specify an address, the Connector will listen on all IP addresses assigned to the machine where Tomcat is running. You must specify a port (I used the standard value of 8080) and you'll want to set isAjp and isSSL to false.

With this complete, you should be able to point your browser at localhost:8080 and see the standard Tomcat ROOT application.

The main purpose of improving the JMX features was to allow management tools better visibility and control over Tomcat instances. For example, a management tool could keep track of the current required configuration and dynamically configure the Tomcat instance via JMX both while the instance is running and when the instance is restarted. This would allow a management tool to have full control over a Tomcat instance's configuration without having to keep the management tool's view of the Tomcat configuration and the instance's server.xml file in sync.

The JMX improvements are still a work in progress. There are still a number of operations and attributes that don't work correctly. As always patches to improve the situation are very welcome. If you'd like to get involved in this effort - or any other aspect of Tomcat development - please subscribe to the Tomcat dev list and drop the developer community a note.

Comments:

foi assim.........

Posted by joel.digitaldesign@gmail.com on September 22, 2015 at 02:10 AM UTC #

Nice for information about the author of the best

Posted by agen dr lsw indonesia on August 13, 2018 at 05:12 PM UTC #

I’m really happy to say it was an interesting post to read on "Tomcat 7 trunk and JMX" . I learned new information from your article, you are doing a great job. Continue

Posted by Olivia Jackson on November 23, 2018 at 06:43 AM UTC #

Good news bro

Posted by http://caramemperbesarkelamin.com on January 18, 2019 at 04:44 PM UTC #

Thanks for sharing this article. You can learn many things from this. Imagination is really good.

Posted by CISSP Exam Practice Test on January 19, 2019 at 05:56 AM UTC #

Thanks for sharing this Awesome article.

Posted by Soul Mortal on March 14, 2019 at 03:40 PM UTC #

Need more of this type of content from you, as this was quite an interesting one to read. I wish the article would have been a little more longer.

Posted by CDR Report on May 10, 2019 at 07:06 PM UTC #

Thank you for this article, it was really interesting. www.towingevansville.com

Posted by Evansville Towing on June 10, 2019 at 06:51 PM UTC #

I Will Narrate brief Biography or Life or Sucess Story About Techno Ruhez.

Posted by Techno Ruhez Biography on June 12, 2019 at 01:23 PM UTC #

i love it https://www.carpetcleaning-simivalley.com/ https://www.windowtintingvisalia.com/

Posted by Marva B Hammes on June 15, 2019 at 10:07 AM UTC #

Supercharge your workouts and transform your body in as little as 30 days with CrazyBulk legal steroids. Shop now for free shipping.

Posted by progentra on June 18, 2019 at 10:39 AM UTC #

i really love it thanks for this https://www.inavegas2.com

Posted by uzair naqash on June 22, 2019 at 09:45 AM UTC #

looks great https://sureman.net/

Posted by uzair naqash on June 22, 2019 at 09:45 AM UTC #

thanks for such amazing update i really love it https://www.tocabaca.com

Posted by Marva B Hammes on June 22, 2019 at 09:46 AM UTC #

i really love it https://www.ddajago.com

Posted by Marva B Hammes on June 22, 2019 at 09:46 AM UTC #

thanks for sharing https://www.madisonheightstowingservice.com/

Posted by uzair naqash on June 22, 2019 at 09:46 AM UTC #

love it https://www.troyheatingcoolingservice.com/

Posted by Marva B Hammes on June 22, 2019 at 09:47 AM UTC #

Tomcat 7 trunk and JMX is the best , I like it. Thanks! https://www.maggardlaserart.com/

Posted by Daniel Perez on June 28, 2019 at 01:42 PM UTC #

Tomcat is a web server and a Servlet/JavaServer Pages container. It is often used as an application server for strictly web-based applications but does not include the entire suite of capabilities that a Java EE application server would supply. ... Apache Tomcat home page. https://thebuttonowl.co.uk/ https://www.shelbytownshipheatingcooling.com/

Posted by uzair naqash on June 30, 2019 at 12:06 PM UTC #

http://tiny.cc/3a808y

Posted by uzair naqash on June 30, 2019 at 12:19 PM UTC #

Tomcat is a web server and a Servlet/JavaServer Pages container. It is often used as an application server for strictly web-based applications but does not include the entire suite of capabilities that a Java EE application server would supply. ... Apache Tomcat home page https://celewiki.com/gima-ashi-garima-chaurasia/

Posted by Gima Ashi on July 03, 2019 at 02:20 AM UTC #

Thanks for sharing https://www.clintontownshipheatingcooling.com/ https://jocote.org/ https://abalgama.site/

Posted by uzair naqash on July 07, 2019 at 07:55 PM UTC #

This software can really make a difference in business. To learn more, please visit https://www.renojunkremovalpros.com and be sure to say hi!

Posted by Freddy on July 09, 2019 at 03:43 AM UTC #

Love this update https://www.ablewebpro.com/ https://www.betcle.com/ https://onca888.com/

Posted by Marva B Hammes on July 09, 2019 at 09:04 AM UTC #

Good Article I Very like it

Posted by Sean Delaney on July 13, 2019 at 10:44 AM UTC #

Superbly written post! http://euroelectrica.ru/ http://postroyka.org/ http://stroybud.com/ http://womenis.ru/

Posted by euroelectrica.ru on July 15, 2019 at 02:12 PM UTC #

Agree! This is a great inspiring article. I am pretty much pleased with your good work. http://myogorod.ru/ http://www.senao.org/ http://mrokna.ru/ http://ladies-paradise.ru/ http://stroykadekor.ru/ http://glavspec.ru/

Posted by ladies-paradise.ru on July 18, 2019 at 01:30 PM UTC #

So cool !! Very beautiful..

Posted by atmouterdi1977 on July 20, 2019 at 04:41 PM UTC #

Looks clean i love this style

Posted by roigiesomve1980 on July 20, 2019 at 05:25 PM UTC #

Love those strong and bright colors Great design, although it is a little eerie that the people don't have eyes!

Posted by willtannesttor1973 on July 20, 2019 at 05:47 PM UTC #

This is really awesome!) This is so creative and unique! Absolutely adore this!

Posted by liriconru1981 on July 20, 2019 at 06:23 PM UTC #

Awesome work on all kinds of levels!! Top work!

Posted by renmureere1984 on July 20, 2019 at 07:15 PM UTC #

Hablando en serio, tu trabajo es sorprendente. ♥ I love these renders. Characters looks friendly :)

Posted by unlenpema1984 on July 20, 2019 at 11:22 PM UTC #

nice texture Its cool :)

Posted by loifitmonthrung1975 on July 21, 2019 at 12:11 AM UTC #

¡Excelente trabajo! Saludos Thank you @Mahfuz Riad!

Posted by lidesccouta1986 on July 21, 2019 at 01:03 AM UTC #

I'm 5 and i want this!1 Brilliant job!!!

Posted by quigraphhouswers1971 on July 21, 2019 at 04:44 AM UTC #

Great job, love the use of the colors here Elegant work!

Posted by kapatason1972 on July 21, 2019 at 05:16 AM UTC #

This is insane..Love it !! amazing illustration

Posted by fmustatinum1975 on July 21, 2019 at 06:30 AM UTC #

Excelente!!! wow How Beauty It Is

Posted by imactirog1972 on July 21, 2019 at 07:02 AM UTC #

Polacy przodują w tym stylu ilustracji :) Congrats!

Posted by altracesog1972 on July 21, 2019 at 07:35 AM UTC #

fresh! so love!

Posted by anslaprialu1970 on July 21, 2019 at 08:06 AM UTC #

oh! thats Tin Tin hair :D OUTSTANDING!!!

Posted by timotasa1985 on July 21, 2019 at 08:39 AM UTC #

Great one! Beautiful photography!

Posted by titboydarcart1988 on July 21, 2019 at 09:12 AM UTC #

This has a dark theme to it, but it looks aesthetic! How do you keep the bike clean all the time?

Posted by roleftkasa1970 on July 21, 2019 at 09:44 AM UTC #

Impressive Thanks for sharing.

Posted by fueredaho1985 on July 21, 2019 at 10:17 AM UTC #

Good Job and Best wishes for your future projects))) I really like well done super!!!

Posted by eepperlemo1975 on July 21, 2019 at 10:50 AM UTC #

Post a Comment:
  • HTML Syntax: NOT allowed

Calendar

Search

Hot Blogs (today's hits)

Tag Cloud

Categories

Feeds

Links

Navigation