5 Replies Latest reply on Aug 10, 2007 1:53 PM by Tomislav Tkal?evi?

    flush-mode=

    Tomislav Tkal?evi? Novice

      I would like to know is it possible to somehow
      configure every long-running conversation to begin as flush-mode="MANUAL"?
      Every conversation that starts in my app are like that,and
      this would spare me precious time and code also.
      Thanks in advance

        • 1. Re: flush-mode=
          Tomislav Tkal?evi? Novice

          Really sorry about the uncompleted name of the post.Should be like "flush-mode="MANUAL" in all conversations"

          • 3. Re: flush-mode=
            Tomislav Tkal?evi? Novice

            thanks,so it will be possible ;-) !

            • 4. Re: flush-mode=
              Ricardo Memoria Novice

              Hi,

              I have a workaround for that until it's not implemented in SEAM.

              I created a bean like that:

              package com.rmemoria.utils;
              
              import org.jboss.seam.annotations.FlushModeType;
              import org.jboss.seam.annotations.In;
              import org.jboss.seam.annotations.Name;
              import org.jboss.seam.core.Conversation;
              
              @Name("beginConversationEvent")
              public class BeginConversationEvent {
              
               @In
               private Conversation conversation;
              
               public void setFlushModeManual() {
               conversation.changeFlushMode(FlushModeType.MANUAL);
               }
              }


              And in components.xml include the following line:

              <event type="org.jboss.seam.beginConversation">
               <action expression="#{beginConversationEvent.setFlushModeManual}" />
              </event>


              So every long running conversation you start will be flush-mode=manual.

              regards,
              Ricardo

              • 5. Re: flush-mode=
                Tomislav Tkal?evi? Novice

                 

                "rmemoria" wrote:
                Hi,

                I have a workaround for that until it's not implemented in SEAM.

                I created a bean like that:

                package com.rmemoria.utils;
                
                import org.jboss.seam.annotations.FlushModeType;
                import org.jboss.seam.annotations.In;
                import org.jboss.seam.annotations.Name;
                import org.jboss.seam.core.Conversation;
                
                @Name("beginConversationEvent")
                public class BeginConversationEvent {
                
                 @In
                 private Conversation conversation;
                
                 public void setFlushModeManual() {
                 conversation.changeFlushMode(FlushModeType.MANUAL);
                 }
                }


                And in components.xml include the following line:

                <event type="org.jboss.seam.beginConversation">
                 <action expression="#{beginConversationEvent.setFlushModeManual}" />
                </event>


                So every long running conversation you start will be flush-mode=manual.

                regards,
                Ricardo


                Thanks, very good workaround.i will implement it myself too.
                Best regards