This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Standard API to get global information about any Servlet container?

 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • 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
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic