6 Replies Latest reply on Sep 24, 2008 9:38 AM by danielc.roth

    Room Context Conversation ?

    victormlzone

      Hi all seam users, I hope you can help me to find the best way to do this:


      I have an application that needs to operate in a context for many users. This context is called Room Context. Where all user who have begun a conversation with a certain room, could share the same seam component instance. I've been reading about all seam context and scopes, I none of them satisfy my requirements. For what I have read I guess that Conversation Scope just would work for just multiple users but in the same browser/machine, not for multiple users (in different machines) representing a Room Context. BPM Context might be the solution I guess, but since my requirements are not BPM Workflow I dont know if it would be adapted even Im not trying to follow a BPM. It is just a Chat Room Instance that needs to be shared across users which have already entered at certain Room in the lobby page.


      In therms of seam I would have a RoomManager instance component by each Room created by the users. When some user starts a conversation with a Room,this instance will be created if not exist. If it is created, the user just join to that instance and can shared all vars RoomManager instance.


      I dont know if I explain it in a good way, but I would like to be suggested to get my self done.


      Thanks a lot.

        • 1. Re: Room Context Conversation ?
          jguglielmin

          If you were considering using ICEfaces, you would just define each room as a Render Group.  Each of their veiws(for that room) would be registered to the room's group, and any change in the view would be (ajax) pushed to the user's view.  Not sure if you were considering ICEfaces, but thought I would outline the use for you here.  There is an example of using ajax-push with Seam on the ICEfaces Downloads page  Choose Projects, then there is a tab for Seam and seam-auctionMonitor is listed under the 1.7.0 projects (also works with ICEfaces 1.7.1 though).

          • 2. Re: Room Context Conversation ?
            victormlzone

            HI, thanks for reply !!!.. Im not using ICEfaces, Im using Flex as my View. Anyway the principal part of this is How to keep a single instance per Room (group of user and diferent machines). ?


            Having one seam component instance per Room give me the facility to use a clustered enviorament for all seam components.


            I hope u can help me.

            • 3. Re: Room Context Conversation ?
              victormlzone

              Any suggestion? Please help me, I cant find the way to do this !!!

              • 4. Re: Room Context Conversation ?

                You could have a Application scoped AllRoomManager, which holds and manages the RoomManager instances. Then you have a conversation scoped component which has a reference to a certain RoomManager instance.

                • 5. Re: Room Context Conversation ?
                  victormlzone

                  Hi Daniel, What do u mean when u say?:



                  You could have a Application scoped AllRoomManager, which holds and manages the RoomManager instances

                  I understand I can have a AllRoomManager Application scoped component. And inside this a RoomManager instances, maybe using a HashMap or some type of Object contanier. Is it what u mean?.. What would be the type of the RoomManager instance?... do u mean Conversation scoped?... If it does, how can I create a new Instance of this component?. Is it possible? to attach a new instance component inside another component (in the AllRoomManager  Application scoped).


                  Thanks for reply Daniel, sorry for by bad english, Im Mexican :D see u the next.


                  • 6. Re: Room Context Conversation ?

                    RoomManager instance would not be scoped at all. It's just an object accessible from the application scoped AllRoomsManager component. Then you have a conversation scoped RoomAction, which has a reference to the currently used RoomManager.