Costin Manolache wrote:
Remy Maucherat wrote:Ok.
If the question is about using JMX1.2 - it was alredy proposed, and it
seems nobody objected ( but nobody did it either ). If you want to do
that - all you need is update the mbean descriptors, and change all the
arrays to use the JNI names ( [Ljava.lang.String; instead of
java.lang.String[] ). And of course - fix download to get jmxri instead
of mx4j.
When MX4J implements 1.2, we'll switch back.
I'm using JMXRI1.2 - and so far it works very nice.
The new mapper works with my simple test cases and uses some proven (but basic) sorting algorithms. It appears to be fast, although the algorithm cost is greater than using a hashtable or a tree. Anyway, it should be a lot faster than the old mapper (aahhh, zero garbage mapping :-D ), but I have to wait until I've integrated it with Catalina to know how much.
The mapper has a currently unused dependency on JNDI, and I plan to put it in the org.apache.tomcat.util.http.mapper package.
I'll use the new fields it introduces to optimize whatever in the pipeline was not good:
- Checks for /WEB-INF and /META-INF
- B2C conversion for the URI; the encoding will be configurable with an attribute on the connector (people have been asking for it for some reason, instead of using UTF-8 :-( ), and will feature a Nasty Cast (TM) mode for "ISO-8859-1"
- (later) Request dispatcher mapping; I think request dispatching speed is very important as it is (ab)used by popular frameworks like Struts
Regarding the registration listener: there are 2 issues you need to be carefull. First, it would be good if the code is independent ofHow can I listen to registrations with JMX 1.1 ? In 1.2, this is quite obvious, but I think I missed it in 1.1. The static queries are of course similar.
the load order - i.e. listen for notifications but also do a query for
the existing objects. You can do that using JMX query, or by
using the attributes. After you take care of the existing mappings, you can start listening for registration - you can do both with plain
JMX1.1.
I don't know if all the components are registered - we do have the Context and Servlet, but you'll need to make sure the Context mbean is exposing the mappings. Unfortunately JSR77 ( or other standards I know ) do not define any standard attribute that a "WebModule" mbean would use to expose supported mappings - so the code will remain dependent of catalina, but with less cupling.
That's a problem. Too bad ...
BTW, I am now able to create Context mbeans and have them registered automatically - and I'll try to get the same working for Valves, Connectors
and JkHandlers. If this is used with an mbean server that supports
reloading ( like jboss.mx ) - we'll be able to replace modules without
restarting the VM ( which is pretty cool ).
That's good. Remy -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>