users@glassfish.java.net

Re: valve executes twice?

From: <glassfish_at_javadesktop.org>
Date: Wed, 11 Nov 2009 01:03:49 PST

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.

<ras>
[Message sent by forum member 'rsitze' (rsitze_at_us.ibm.com)]

http://forums.java.net/jive/thread.jspa?messageID=371359