6 Replies Latest reply on Dec 17, 2006 7:40 PM by ccurban

    Conversation Timeout and time of conversation destruction

    ccurban

      I need to change the status of an entity at the end of a conversation (even a timed out one).

      Here is the SFSB that should do that:

      @Stateful
      @Scope(ScopeType.CONVERSATION)
      @Name("callCenterAddressAction")
      public class CallCenterAddressAction implements CallCenterAddressLocal
      {
       @Out(required = false, scope = ScopeType.CONVERSATION)
       private Distribution currentDistribution;
      .
      .
      .
       @Destroy
       @Remove
       public void destroy() {
       if (currentDistribution != null) {
       Distribution distribution = inaEntityManager.merge(currentDistribution);
       if (distribution.getStatus().equals(Distribution.STATUS_IN_PROCESS)) {
       distribution.setStatus(Distribution.STATUS_PRE_PROCESS);
       }
       }
       }
      }
      



      To test the behaviour I set the conversation timeout to 10 secs in components.xml
      <component name="org.jboss.seam.core.manager">
       <property name="conversationTimeout">10000</property>
      </component>


      I expected that the conversation will be destroyed after 10 secs (or some time in the near surrounding of 10 secs).
      Unfortunately it seams only to be destroyed when I navigate to another page in the browser.

      Did I make a mistake or is this behaviour only occuring in my single-place-test-environment (and the context cleanup is started on every servlet call)?