Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF Phase Listener - AFTER RENDER RESPONSE is called twice per request!

843842Jun 2 2006 — edited Jun 29 2006
Hi!

i have added a PhaseListener to faces-config.xml. In the after method i am writing the phase to the stdout.

The strange thing is that each time i make a request, the phase listener get's called twice for some phases!!... For example the AFTER RENDER RESPONSE get's called twice.

I want to open a database connection in the BEFORE RESTORE VIEW phase and want to close it in the AFTER RENDER RESPONSE phase, but the problem is that it is not working if the phases are called twice per request....

Why is JSF behaving that way? What else can i do to open and close my connection for each request?

Thx in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2006
Added on Jun 2 2006
7 comments
508 views