• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Standard API to get global information about any Servlet container?

 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,

can anybody tell me if there's a standardized way to get access to container wide information inside a typical Servlet container? That is I'd like to create a "manager" web application just like the Tomcat manager application which could be used to gather information about all applications running inside a Servlet container.

I know that the Tomcat manager application runs as a privileged context inside Tomcat and therefore has privileged access to detailed global information. But to my knowledge this is a Tomcat specific facility to manage the whole Servlet container and I wonder if there is a container-independent way to create such a "super application"?!? Or maybe there is a much better way to create a centralized manager application without modifying other applications. Then please let me know, I appreciate any advices!

Marco
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, sorry.

You should familiarize yourself with the contents of the Servlet Specification (it's an easier read than you might expect). That will tell you everything that's available.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Every container manages things in a different way. Some might use JMX, some are based on OSGi, and so on. I think what you're trying to do is essentially impossible in any generic way without writing a lot of container-specific code. Heck, *external* deployment stuff is all quite different (witness all the Ant/Maven container plugins), let alone *internal*.

I could be way off base, though.
 
Marco Ehrentreich
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for clarification, Bear! I already suspected that there's at least no easy way inside the Servlet API itsel or something like said.

I already skimmed the Servlet spec some time ago but I think I'm going to make myself familiar with the new version 3.0.

Marco
 
Marco Ehrentreich
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David. I know that the typical specs don't make too much assumptions about implementation details of containers. I just wanted to be sure that I haven't overlooked any features, in particular because there were some efforts to unify container specific deployment issues with the new JEE version 6.

But that's no big deal. I just thought it would be nice to create some kind of container-independent manger application.

Marco
 
reply
    Bookmark Topic Watch Topic
  • New Topic