users@glassfish.java.net

Re: valve executes twice?

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Wed, 11 Nov 2009 15:41:14 -0800

On 11/11/09 01:03, glassfish_at_javadesktop.org wrote:
> OK!
> I've got something meaningful for you now.
>
> Glassfish 2.1; Windows & Linux (ain't Java great!)
>
> * The valve is deployed as part of a web application, in sub-web.xml:
> -- <property name="valve_1" value="my.valve.MyValve"/>
>
> * web app must be packaged in an EAR (no problem if WAR deployed).
>
> * problem only occurs following AppServer restart; on deploy or redeploy it works as expected.
>
> Find attached a sample EAR file, and a copy of the log file immediately following server restart & one hit on a servlet. In the log file, search for 'valve_1'. You'll see it "ignored" twice during startup (normally it's only "ignored" once!). And of course, immediately prior to the hit on the servlet, you'll see the Valve saying hello twice.
>

Thanks for the test case and for narrowing down the issue!

I just deployed your EAR file to GlassFish v3, restarted the domain, and
then accessed your Servlet.
I see the following in my server.log:

[#|2009-11-12T07:26:26.926+0800|INFO|glassfishv3.0|null|_ThreadID=25;_ThreadName=Thread-1;|Hello,
I'm a VALVE|#]

[#|2009-11-12T07:26:26.928+0800|INFO|glassfishv3.0|null|_ThreadID=25;_ThreadName=Thread-1;|Hello,
I'm a SERVLET|#]

Looks like the valve is invoked just once (as expected), which means
that if there is any issue,
GlassFish v3 is not suffering from it.

I'll try GlassFish v2.1 next.

Do you have a GlassFish v3 installation by any chance where you could
try this?

Thanks,

Jan

> <ras>
> [Message sent by forum member 'rsitze' (rsitze_at_us.ibm.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=371359
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>