5 Replies Latest reply on May 1, 2013 8:20 AM by smysnk

    Session persistance + workflow

    smysnk

      Hi,

       

      I have an application that uses session information to store user information, while developing the application I will:

       

      1) Deploy the application

      2) Login using an authorized user

      3) Test authorized user stuff

       

      Each time I deploy the application, session information is being lost and I have to re-login everytime I deploy the application.  Having to login every time I re-deploy seems like a cumbersome process, is there no way to have session information persisted between deployments?  There is probably an obvious answer to this, but I'm not getting it...

       

      I have looked into session replication but seems like overkill for a simple problem.

       

      Any

        • 1. Re: Session persistance + workflow
          nickarls

          I'm not aware of any such mechanism - even if would exist I think it would be a bit unreliable. One option is using JRebel or some other classloader-magic-util. Or then use Arquillian or some other tool to do the boring stuff ;-)

          • 2. Re: Session persistance + workflow
            sfcoy

            Believe it or not WebSphere does this.

             

            It serializes active sessions to a store when an application is stopped and reinstates it when the application is restarted.

            • 3. Re: Session persistance + workflow
              jaikiran

              JBoss AS used to do it (via a configuration option) in older versions. The current version doesn't support it though, from what I remember.

              • 4. Re: Session persistance + workflow
                jaikiran

                jaikiran pai wrote:

                 

                JBoss AS used to do it (via a configuration option) in older versions. The current version doesn't support it though, from what I remember.

                Actually, I'm not 100% sure. I'll have to dig out some mails or look at the code to see whether or not it's supported.

                • 5. Re: Session persistance + workflow
                  smysnk

                  After some googling I did see a property could be set on VM arguments, "-Dorg.apache.catalina.session.StandardManager=session.ser".  After starting up AS7 I saw that it was creating a file by that name at ./standalone/tmp/work/jboss.web/default-host/service/session.ser

                   

                  However after re-starting the server my sessions still did not seem to be persisting, so not sure where to go next on that one... But after checking out JRebel, that's the game changer I was looking for, thanks!