|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
valve executes twice?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? valve & log attached. [Message sent by forum member 'rsitze' (rsitze@...)] http://forums.java.net/jive/thread.jspa?messageID=370399 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: valve executes twice?On 11/03/09 16:07, glassfish@... 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@...)] > > http://forums.java.net/jive/thread.jspa?messageID=370399 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: valve executes twice?done. Given past behavior, it may be a few days before I see this again.
[Message sent by forum member 'rsitze' (rsitze@...)] http://forums.java.net/jive/thread.jspa?messageID=370518 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: valve executes twice?On 11/04/09 09:54, glassfish@... wrote:
> done. Given past behavior, it may be a few days before I see this again. > Thanks! Will be interesting to see what you get. Jan > [Message sent by forum member 'rsitze' (rsitze@...)] > > http://forums.java.net/jive/thread.jspa?messageID=370518 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: valve executes twice?no luck... not sure if this is good or bad.
I did fix a problem in my valve where I was invalidating the session a bit too frequently. Not seeing the 'double hit' since. I can provide more specific code if you think the session invalidate might somehow influence the valve flow... otherwise I'll let it go until/unless I see the problem come around again. <ras> [Message sent by forum member 'rsitze' (rsitze@...)] http://forums.java.net/jive/thread.jspa?messageID=371044 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: valve executes twice?On 11/07/09 20:45, glassfish@... wrote:
> no luck... not sure if this is good or bad. > > I did fix a problem in my valve where I was invalidating the session a bit too frequently. Not seeing the 'double hit' since. I can provide more specific code if you think the session invalidate might somehow influence the valve flow I wouldn't mind double-checking that. If you could provide the code, that would be great. Thanks, Jan > ... otherwise I'll let it go until/unless I see the problem come around again. > > <ras> > [Message sent by forum member 'rsitze' (rsitze@...)] > > http://forums.java.net/jive/thread.jspa?messageID=371044 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: valve executes twice?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@...)] http://forums.java.net/jive/thread.jspa?messageID=371359 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: valve executes twice?On 11/11/09 01:03, glassfish@... 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@...)] > > http://forums.java.net/jive/thread.jspa?messageID=371359 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: valve executes twice?Good to know the problem isn't in v3. However, I can't move to v3 until it picks up a few more features that v2.1 has. Looking forward to a complete v3.
<ras> [Message sent by forum member 'rsitze' ] http://forums.java.net/jive/thread.jspa?messageID=371488 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |