1 Reply Latest reply on Jan 20, 2007 7:25 PM by Pete Muir

    Detecting updates to Session Scoped Entity Beans

    Chris Jboss Newbie


      I am having some trouble understanding the interactions of managed beans and Seam. I will give a concrete example as I don't think I can really explain the cocepts.

      I have a Session scoped entity bean that represents a meeting, as part of a larger calender application. I want a display to appear on the top of the page that says the current meeting with a link to the details page. It isnt really part of a conversation, which is why it is Session scoped.

      I have a timer that is set when a meeting is created that uses an entity manager to lookup the meeting and change the state to 'complete' when the duration of the meeting has passed. It can cancel a meeting prematurely if no one has called in (it integrates voip), as to not waste voip resources.

      The problem: when the meeting is canceled the session scoped entity bean's state is not changed. It is an issue of persistence contexts/management I assume, but I don't know how to make the timer interact with the proper context, or to configure the session scoped bean to know about the timer's changes.

      Any suggestions?



        • 1. Re: Detecting updates to Session Scoped Entity Beans
          Pete Muir Master

          I'm not really following you (my fault, I've been staring at a screen for too long ;) BUT, I will re-iterate the advice, that, with Seam, you only ever want to put into the session information that really belongs there (i.e. normally just info about the currently logged in info).

          You'll find it easier to make the entity bean conversation scoped and, if necessary, manage it's lifecycle with a session scoped component.

          Also, if you really are using managed beans (as opposed to Seam components) you're probably making your life harder than need be ;)