JSR77 and tomcat supports JMX for servlets ( and many other components ). This works by exposing the wrapper - and providing all kind of information. Extending this to the real servlet ( the code written by the user ) would move the servlet in the current century, and is quite easy to do.
Servlets are configured using the ServletConfig passed at init time. We could write a simple module ( mbean ) that listen for JSR77 mbean registrations. When j2eeType=Servlet is registered, it can look for the "real" servlet and check if it is an mbean ( implements the *MBean interface, etc). If so - it will just configure the servlet using JMX patterns ( including init()/start() lifecycle pattern ).
The JMX console would show what happens inside the servlet - and allow runtime tunning and reconfiguration of the servlet. Whenever we support the JMX persistence - we can extend this to the servlet and context init params.
Another extension would be to support ant-like patterns - a serlvet ( that implements single thread model ) can automatically get the request parameters transformed into setter calls, like an ant task, and then an execute() method to perform the request. This can be supported with a base class - and would allow a number of optimizations and more important - will greatly increase the readability of the servlet code.
Technical stuff
Sunday, February 02, 2003
JMX servlets
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2003
(44)
-
▼
February
(16)
- JMX console
- Sending mail to the blog
- Back from traffic school
- Wiki, Weblog and Pine
- First problem with mail blogs
- Mail aggregator
- mail and weblog (3)
- Soap over SSL without signed certs
- mail blog (2)
- Mail blog
- OS problems
- Got my linux back
- Blog reader distribution
- linux and java
- JMX servlets
- Gentoo (and gump)
-
▼
February
(16)
No comments:
Post a Comment