webtier@glassfish.java.net

Re: [webtier] configurable valves

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 08 Jan 2009 18:04:23 -0800

Hi Wolfram,

On 01/08/09 12:57, Wolfram Rittmeyer wrote:
> Hi all,
>
> this has been bugging me for some time now - so I thought I probably
> should start tackling it.
>
> It all started about a year ago when I wanted to implement a custom
> expires-header-valve. I posted a question on the dev-list stating that
> I needed Valves to be configurable. I knew how to configure Valves on
> Tomcat and was wondering how to do that on GlassFish as well.
>
> Even though Valve support has since increased - it still lacks the
> feature of configurability.
>
> As recommended by Jean Francois I finally posted two RFEs:
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=4006
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=4007
>
> In theses RFEs I suggest a possible syntax for an asadmin command
> (4007) and for the domain.xml (4006) file.
>
> So given that these RFEs are still in UNCONFIRMED state I wonder what
> I can do to implement these features myself - and whether these would
> be considered useful at all. Maybe I'm the only one interested in them
> ;-)
>
> _If_ implementing them would be welcomed there are some questions to
> consider:
>
> What about the suggested syntax? Who decides about this? What is the
> general approach about getting consensus on stuff like this?
>
> What about Grizzly config? I found one page on the Wiki about the
> Grizzly config - but didn't find any actual config file in the
> v3prelude. It looks like it would belong in here. Correct?
>
> Finally: It's not like I do have a lot of time at hand. So
> implementing might last a while.
>
> I'm looking forward to any comments.
I think your enhancement requests are very useful. Thanks for filing
them, and most of all, thanks for volunteering to providing patches
for these enhancements!

As you pointed out, your proposed enhancements will affect several
functional areas of GlassFish, including the admin/CLI, admingui, and
the web container.

Unfortunately, we are approaching feature freeze date for v3, so I'm
not sure we'll be able to address this for v3. But on the other hand,
since you've offered to code some of this yourself, there *might* be a
chance. Of course, I would be available to help with any webcontainer
integration issues, but we would also need to work with the leads of
the remaining areas.

I agree with your proposed format of the <valve> config element. As
for ordering, I assume your intention is for valves to be added to a
virtual server / web module in the order in which they have declared?

As you know, valves may also be declared in sun-web.xml, so we should
consider adding support for <valve> there, too.


Jan