JSF Phase Listener - AFTER RENDER RESPONSE is called twice per request!
843842Jun 2 2006 — edited Jun 29 2006Hi!
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!