5 Replies Latest reply on Apr 7, 2008 3:51 PM by gjeudy

    Outject variable in conversation scope not being set in the context

    gjeudy

      Hi,


      I have a very specific example where I use 2 instances of the same SFSB in the same conversation. The bean is declared as follows:


      @Stateful(mappedName="RefDomRelateInstancesAction")
      
      @Scope(ScopeType.CONVERSATION)
      
      @Name("domRelateInstancesAction")
      
      @Conversational
      
      @Local(RefDomRelateInstancesAction.class)
      
      @Role(name="domRelateInstancesAction2")



      variable myvar is injected/outjected in the following manner:


      @In(required=false, create=true)
      
           @Out(required=false)
      
           private List<DomainInstanceVO> myvar;
      
      



      my facelets page refer to the bean using name domRelateInstancesAction and set/outject myvar to Conversation context with a certain value. This works normally.


      Later on, another facelets page refer to the bean using name domRelateInstancesAction2 (this instantiates a new SFSB), the existing myvar is injected to that new SFSB instance since it participates in the same conversation. That new SFSB instance modified myvar and outjected to the conversation successfully, I can tell by debugging in the BijectionInterceptor. However, if I refer to

      #{myvariable}
      
      

      in my facelets page I still see the old values set by the initial SFSB instance. Triggering the Seam debug page at this point confirms this.


      I can provide more details about my usecase if needed. I don't understand why the old values somehow overwrote the ones set by the new instance. Anyone got tips on how I could troubleshoot this issue ?


      From my understanding injection/outjection occurs on every method invocation of a seam component, once instance 2 set the new myvar I can't see how the old values would popup again because it would require a subsequent call to instance1 to trigger bijection but then instance1 should get the modified myvar that was outjected previously by instance 2. Therefore I don't believe it is possible.


      Is there anything specific to the bijection algorithm that could make what I've seen happen ?


      Thanks,