1 Reply Latest reply on Jan 13, 2012 10:30 AM by Joshua Davis

    Session Timeout Issue Webservice

    Thi Quynh BUI Newbie
      Hello,

      I uses seam 2.2.2 and jboss 4.2.2

      I have an very simple application, it is a webservice which has :

      - stateless



      `@Stateless
      @Name("helloService")
      @WebService(serviceName = "helloService")

      public class helloService
              implements helloServiceRemote {      
            
              @WebMethod
              public String GetHello()
              {
                  helloInterface Hello = (helloInterface)Component.getInstance("hello");
                  return Hello.sayHello();
                 
              }

      }`



      - a conversation seam component



      `@Name(value = "hello")
      @Scope(ScopeType.SESSION)
      public class helloBean implements helloInterface
      {
         
          public String sayHello()
          {
                return "Hello the world";
          }
         
        @Destroy
        public void destroy()
        {
            System.out.println("Destroy of HelloBean");
        }
      `


      My issue is the session timeout (defined in web.xml) does not work.
      <session-config>
              <session-timeout>5</session-timeout>
          </session-config>

      The destroy() method is never called. The helloBean component is detroyed after 1 hour.

      Can you tell me what am i wrong ? and why the session timeout dans @Destroy does not work.

      Thanks
      Best regards
      BTQ**