users@glassfish.java.net

Re: valve executes twice?

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Tue, 03 Nov 2009 17:42:27 -0800

On 11/03/09 16:07, glassfish_at_javadesktop.org wrote:
> Environment: Glassfish 2.1, Linux
>
> I've got a web-application wherein I deploy a valve:
>
> <sun-web-app error-url="">
> <context-root>/systems</context-root>
> <class-loader delegate="true"/>
> <jsp-config>
> <property name="keepgenerated" value="true">
> <description>blah blah</description>
> </property>
> </jsp-config>
> <property name="valve_1" value="my.project.MyValve"/>
> </sun-web-app>
>
>
> My valve (source pasted below) does some simple message logging so I can monitor it. On initial deploy, I note it gets executed once.. but after some indeterminate period of time, or after some unknown event, it begins to be executed twice on every invocation of my servlet.
>
> My only recourse to eliminate the redundant call is apparently to redeploy the application or restart the server.
>
> While I'd like to understand what's triggering the behavior, I'd just settle for knowing how to avoid it.
>
> Has anyone else seen such?
>

This seems strange. Could you perhaps add a thread dump to your valve's
invoke method, so we can see why it is getting called twice per servlet
invocation?

Thanks,

Jan

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