Interesting error,

I've used a phaselistener to render multiple images in a page when developing the new version of chart creator with no problem.

FacesContextFactory creates FacesContext objects bound to each request lifecycle. FacesContext's release method is used for pooling not to create a FacesContext for each request, this seems to be the reason. The solution could be to figure out a way to tell faces not to to do pooling. Any ideas?

Cagatay

On 6/12/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
hey,

you may take a look at [1]

-Matthias

[1] http://jroller.com/page/cagataycivici?entry=phaselistener_renders_an_image_no

On 6/11/06, Ondrej Svetlik <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I have a simple phase listener to send image data from database. It
> works fine until I want to download two images paralelly. The last
> action I do after sending all data to the client is
>
> fc.responseComplete();
>
> where fc is a FacesContext. I tried to download two images and when the
> last one finishes, I get an exception:
>
> 01:17:05,280  INFO [/ropp]:646 - ImageListener.afterPhase(): /image/688
> 01:17:06,333  INFO [/ropp]:646 - ImageListener.afterPhase(): /image/691
> 01:17:14,493 ERROR PhaseListenerManager:91 - Exception in PhaseListener
> RESTORE_VIEW(1) afterPhase
> java.lang.IllegalStateException: FacesContext already released
> at
> org.apache.myfaces.context.servlet.ServletFacesContextImpl.responseComplete(ServletFacesContextImpl.java :327)
> at ImageListener.handleImageRequest(ImageListener.java:105)
> at ImageListener.afterPhase(ImageListener.java:35)
> at
> org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter (PhaseListenerManager.java:89)
>
> Any ideas how to fix this problem?
>
> Best regards
>
> Ondrej Svetlik
>


--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to