9 Replies Latest reply on Oct 17, 2012 8:42 AM by jpadula35

    session-timeout not in GateIn-3.4.0.Final

    jpadula35

      Hi,

      There used to be a session-timeout that we could configure in GateIn-3.1.0-GA. It was located here:

      GateIn-3.1.0-GA\server\default\deploy\gatein.ear\02portal.war\WEB-INF\web.xml

       

      <session-config>

         <session-timeout>30</session-timeout>

      </session-config>

       

       

      In GateIn-3.4.0.Final-jbossas6, I can no longer find this in the web.xml file. Is there a new way to configure a timeout for the portal?

        • 1. Re: session-timeout not in GateIn-3.4.0.Final
          haint

          No. You can declare it in portal.war/WEB-INF/web.xml or application server configuration

          • 2. Re: session-timeout not in GateIn-3.4.0.Final
            jpadula35

            Thanks Hai.

             

            Can you clarify what you mean by portal.war? Do you mean our portlet war file? I don't see a portal.war anywhere? Also, could you give a little more detail on what you mean by the "application server configuration? How do I configure that?

             

            My understanding was that the session-timeout in the old 02portal.war\WEB-INF\web.xml was for the overall portal, and we have been making a different timeout within each portlet WEB-INF/web.xml to help solve some timeout issues.

            • 3. Re: session-timeout not in GateIn-3.4.0.Final
              haint

              I mean 02portal.war (it is portal.war on Tomcat). You could configure global session-timeout in configuration of webapp server (JBoss, Tomcat,...). But could not configure session-timeout for each portlet. What is your timeout issue?

              1 of 1 people found this helpful
              • 4. Re: session-timeout not in GateIn-3.4.0.Final
                jpadula35

                Thanks Hai.

                 

                But that's my point. We are referring to the exact same location. However, in 3.4.0.Final the web.xml at this location no longer has the session-timeout element. So that is my question, where did it go?

                 

                The problem we were having was that our portlets session would time out. So we tried to make the individual portlet timeout longer than the portal timeout that was configured on portal02.war. (I'm not sure if it was working, but I noticed that in 3.4.0.Final, it no longer exists.

                • 5. Re: session-timeout not in GateIn-3.4.0.Final
                  hoang_to

                  @Joseph: There is default value session-timeout, managed by servlet container.

                   

                  I don't see the point of having session timeout of portlet app greater than portal.war 's.

                  1 of 1 people found this helpful
                  • 6. Re: session-timeout not in GateIn-3.4.0.Final
                    jpadula35

                    The issues we were having, are not occuring in 3.4.0.Final. I've removed the session-timeout from the individual portlet web.xml.

                     

                    Thanks for both of your replies, Hai and Minh.

                    • 7. Re: session-timeout not in GateIn-3.4.0.Final
                      antoine_h

                      Hi,

                       

                      When you modify the session-timeout in the web.xml of the 02Portal.war, do you also set it accordingly in the Rest war, the exoResource war etc ?

                      If not done so, you may have the session destroyed in those other usefull war, and then the global process to provide a page that goes wrong.

                       

                      What I used to do is set it in the default file for all the tomcat web app : the web.xml that was in the tomcat folders, and that was used as the default web.xml values, for any webapp.

                      On tomcat, you can find this file in : TOMCAT_HOME/conf/web.xml

                       

                      Antoine

                      J2EE, JBoss AS7, JBoss Portal, EPP5, and GateIn, JSF, Richfaces, UXP.

                      • 8. Re: session-timeout not in GateIn-3.4.0.Final
                        jpadula35

                        Antoine,

                        Thanks for the useful info. No, we didn't change the session-timeout in the other places you mentioned. That may explain that fact that it didn't fix out problem. Like I said, I took out those changes in our Gatein3.4.0.Final deployment and I have not been seeing any timeout issues. (Leaving them in didn't cause any issues either but I took them all out.)

                        • 9. Re: session-timeout not in GateIn-3.4.0.Final
                          jpadula35

                          I had thought the problems cleared up in 3.4.0.Final, but now I am seeing similar problems. For example we have several portlets that you can get through from the menus. Sometimes if you select a different portlet, you are not directed to the new portlet but just stay on the same page. And then the page is unresponsive to user input. I used to be able to refresh the page and that would bring it back to life. But now refreshing the page doesn't help. All of our portlet beans are session scoped. If the portal did somehow time out, is there someway to have a login prompt appear?

                           

                          Another thing that happens is that if I stay logged into the portal overnight, I see a message like this several hours later:

                          2012-10-17 00:12:56,005 INFO  [com.arjuna.ats.arjuna] (Transaction Expired Entry Monitor) ARJUNA-12296 ExpiredEntryMonitor running at Wed, 17 Oct 2012 00:12:56

                           

                          But the portlet page is still displayed but clicking a button that would normally launch a popup doesn't do anything.

                           

                          Here is the settings in the web.xml (mostly taken from the Richfaces 4.2.2 Showcase):

                          <?xml version="1.0" encoding="UTF-8"?>

                          <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

                              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID"

                              version="3.0">

                             

                                    <display-name>SessionManagementPortlet</display-name>

                           

                           

                                    <context-param>

                                              <param-name>javax.faces.FACELETS_LIBRARIES</param-name>

                                        <param-value>/WEB-INF/functions.taglib.xml</param-value>

                                    </context-param>

                           

                           

                              <context-param>

                                  <param-name>org.richfaces.skin</param-name>

                                  <param-value>#{skinBean.skin}</param-value>

                              </context-param>

                              <context-param>

                                  <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>

                                  <param-value>100000</param-value>

                              </context-param>

                              <context-param>

                                  <param-name>org.richfaces.fileUpload.createTempFiles</param-name>

                                  <param-value>false</param-value>

                              </context-param>

                              <!-- Change PROJECT_STAGE to Production for customer releases -->

                              <context-param>

                                  <param-name>javax.faces.PROJECT_STAGE</param-name>

                                  <param-value>Development</param-value>

                              </context-param>

                              <context-param>

                                  <param-name>org.richfaces.resourceOptimization.enabled</param-name>

                                  <param-value>true</param-value>

                              </context-param>

                              <context-param>

                                  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

                                  <param-value>server</param-value>

                              </context-param>

                              <servlet>

                                  <servlet-name>Faces Servlet</servlet-name>

                                  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

                                  <load-on-startup>1</load-on-startup>

                              </servlet>

                              <servlet-mapping>

                                  <servlet-name>Faces Servlet</servlet-name>

                                  <url-pattern>*.jsf</url-pattern>

                              </servlet-mapping>

                              <servlet-mapping>

                                  <servlet-name>Faces Servlet</servlet-name>

                                  <url-pattern>/faces/*</url-pattern>

                              </servlet-mapping>

                              <mime-mapping>

                                  <extension>xcss</extension>

                                  <mime-type>text/css</mime-type>

                              </mime-mapping>

                              <login-config>

                                  <auth-method>BASIC</auth-method>

                              </login-config>

                              <!-- Force this Servlet to use one Thread per connection

                                   instead of native API as workaround for (RF-11064)  -->

                              <context-param>

                                  <param-name>org.atmosphere.useBlocking</param-name>

                                 <param-value>true</param-value>

                              </context-param>

                                        <!-- AFT - Spring Configuration -->

                                    <context-param>

                                              <param-name>contextConfigLocation</param-name>

                                              <param-value>/WEB-INF/spring-beans.xml</param-value>

                                    </context-param>

                                    <listener>

                                              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

                                    </listener>

                                    <listener>

                                              <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>

                                    </listener>

                              <!--

                                    Comments in XHTML files can be extremely disruptive because

                                    some of them take up space in tables, etc.

                                     -->

                                    <context-param>

                                              <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>

                                              <param-value>true</param-value>

                                    </context-param>

                           

                           

                                    <context-param>

                                              <param-name>javax.faces.FACELETS_RESOURCE_RESOLVER</param-name>

                                              <param-value>com.dev.portlet.common.CustomResourceResolver</param-value>

                                    </context-param>

                           

                                    <!-- Use bundled JSF in war, rather than what is packaged with JBossAS6 -->

                                    <context-param>

                                        <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

                                          <param-value>true</param-value>

                                      </context-param>

                           

                          </web-app>