1 Reply Latest reply on Oct 23, 2011 11:25 PM by Tim Evers

    Get all instances of a bean (in all living conversations)

    Juan Ignacio Garzon Newbie

      Hi!


      I have an application scoped bean that handles messages sent from one user to other. Its application scoped because every message passes through the same instance of this bean.


      I want to retrieve every single instance of another component, in all living conversations. I mean: I want to access beans of another conversation from my application-scoped bean. Is there a way to accomplish this?


      thanks in advance!

        • 1. Re: Get all instances of a bean (in all living conversations)
          Tim Evers Master

          Generally speaking no.


          Accessing beans from multiple different sessions across multiple conversations is not easily accomplished. I'm sure with enough playing around you could probably work something out but, at the end of the day your design sounds wrong.


          Stop trying to push down from application scope to session/conv. Instead have your conversations pull from the application scoped bean.


          Why don't you tell us why you want to do this and then maybe we can suggest a better alternative.