9 Replies Latest reply on Nov 13, 2009 5:46 PM by Peyman Rezaei

    Weird Converasation Behaviour (timeout related?)

    Francois Eric Novice

      Hi,


      I have a weird conversation behaviour which I cannot explain.  I have read many posts and documentation on conversation timeout (background and foreground) but don't seem to understand what is happening in my particular case.


      I have a form which is linked to a stateful conversation scope bean (which will call a few other beans with conversation scope). 


      The exact behaviour is hard to explain but I'll do my best:


      In my form if I perform the following:




      • I interact with my foreground conversation and let the window still for 10 minutes

      • After the 10 minutes I interact with it again (validating an input field for example)





      For a reason I do not understand, the form does not react as expected. For example when I click a a4j:commandButton, it should add a field to my list of fields...it doesn't do it anymore.  My form just won't react as it used to.


      If I do the exact same steps, but for less than 10 minutes, everything is fine (i.e. the form reacts normally).


      My converstaion timeout is set to 15 minutes and my session timeout is set to 12 hours.  I don't think its either of them interacting here since my session seems to be still valid and I don't interact with the application in any other way (so I'm still in my foreground conversation).



      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
          xmlns:core="http://jboss.com/products/seam/core"
          xmlns:persistence="http://jboss.com/products/seam/persistence"
          xmlns:drools="http://jboss.com/products/seam/drools"
          xmlns:bpm="http://jboss.com/products/seam/bpm"
          xmlns:security="http://jboss.com/products/seam/security"
          xmlns:mail="http://jboss.com/products/seam/mail"
          xmlns:ui="http://jboss.com/products/seam/ui"
          xmlns:web="http://jboss.com/products/seam/web"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:navigation="http://jboss.com/products/seam/navigation"
          xmlns:async="http://jboss.com/products/seam/async"    
          xmlns:transaction="http://jboss.com/products/seam/transaction"
          xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd 
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd 
                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd
                       http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd
                       http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.2.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd
                       http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd
                       http://jboss.com/products/seam/navigation http://jboss.com/products/seam/navigation-2.2.xsd">
      
      <!-- 
          <web:character-encoding-filter encoding="UTF-8" override-client="true" url-pattern="*.do" />/>
       -->
       
          <!-- ***************** -->
          <!-- ***************** -->
          <!-- GENERAL SETUP -->                  
          <!-- ***************** -->
          <!-- ***************** -->
          <core:manager conversation-timeout="900000" 
                        concurrent-request-timeout="5000"
                        conversation-id-parameter="cid"/>
      
          <core:init jndi-pattern="totaltest/#{ejbName}/local" debug="true"/>
      
           <navigation:pages>
               <navigation:resources>
                   <value>/WEB-INF/pages.xml</value>
                   <value>/WEB-INF/pages-custom.xml</value>
               </navigation:resources>
           </navigation:pages>
      
          <!-- ***************** -->
          <!-- ***************** -->
          <!-- RESOURCES SETUP -->                  
          <!-- ***************** -->
          <!-- ***************** -->
          <core:resource-loader>
              <core:bundle-names>
                  <value>messages</value>
                  <value>messages-custom</value>       
              </core:bundle-names>
          </core:resource-loader>
          
          
          <!-- ***************** -->
          <!-- ***************** -->
          <!-- HIBERNATE SETUP -->                  
          <!-- ***************** -->
          <!-- ***************** -->
          <persistence:hibernate-session-factory name="hibernateSessionFactory" cfg-resource-name="hibernate.cfg.xml" auto-create="true" />
          <persistence:managed-hibernate-session name="persistenceSession" auto-create="true" session-factory="#{hibernateSessionFactory}" />
          
          <persistence:hibernate-session-factory name="hibernateMigrationSessionFactory"  cfg-resource-name="hibernate.migration.cfg.xml" auto-create="true" />
          <persistence:managed-hibernate-session name="migrationPersistenceSession" auto-create="true" session-factory="#{hibernateMigrationSessionFactory}"/>
      
          <transaction:hibernate-transaction session="#{persistenceSession}" auto-create="true"/>    
          <ui:hibernate-entity-loader session="#{persistenceSession}" />
       
          <!-- ***************** -->
          <!-- ***************** -->
          <!-- NAVIGATION SETUP -->                  
          <!-- ***************** -->
          <!-- ***************** -->
          <security:identity authenticate-method="#{authenticator.authenticate}"/>
            
          <event type="org.jboss.seam.security.notLoggedIn">
              <action execute="#{redirect.captureCurrentView}" />
          </event>
          <factory name="currentSession" scope="stateless" value="#{facesContext.externalContext.request.session}"/> 
          <event type="org.jboss.seam.security.loginSuccessful">
              <action execute="#{redirect.returnToCapturedView}" />
              <action execute="#{currentSession.setMaxInactiveInterval(43200)}"/>
          </event>
          <mail:mail-session host="localhost" port="2525" username="test" password="test" />
      
          <!-- ***************** -->
          <!-- ***************** -->
          <!-- COMPONENTS SETUP -->                  
          <!-- ***************** -->
          <!-- ***************** -->
          <factory name="localizationContext" method="#{localizationFacade.getLocalizationContext}" auto-create="true"/>
      
          <async:quartz-dispatcher/>
      </components>
      



      Any idea what seems to be the problem?  I'm thinking something's timing out somewhere but I'm not sure what it could be.


      Thanks