1 Reply Latest reply on May 4, 2011 3:49 AM by wiktorowski maximilien

    mediaoutput and conversation scope

    Andrew Wheeler Newbie

      Has anyone found a way to use mediaOutput with a conversation scoped bean (CDI)? The createContent method cannot resolve to a bean that is scoped conversation. It works fine for session and request scope.

       

      I want to cache resources before they are persisted (to the database) in the current conversation but as mediaOutput uses a ResourceHandler it is not conversation context aware. Of course I have a workaround by caching the resources at sesssion scope and removing them when the conversation ends.

       

      The really complex workaround is to use a request scoped bean to do the createContent which uses the data resource identifier (which combines the image id + conversation id) to lookup the conversation context and get the cached data.

       

      I'm using Richfaces 4 Final on JBoss6 (Mojarra 2.1)