1 Reply Latest reply on Aug 19, 2014 6:57 AM by igarashitm

    statefull http service

    mlybarger

      i have an existing application implemented as an http servlet. it maintains an application conversation with the client and uses http session to maintain the state.

       

      Client -> "Hello, it's client 12345" -> Server (create session and store state)

      Client <- "Hello, 12345, you need to do A, B, and C, DONE" <- Server

      Client -> "invoke process A" -> Server (invokes process A, crosses it off the list).

      Client -> "invoke process B" -> Server (invokes process B, crosses it off the list).

      Client -> "invoke process C" -> Server (invokes process C, crosses it off the list).

      Client -> "invoke process DONE" -> Server (invokes process DONE, destroy session).

       

      the client is built to know of this conversation and how to invoke it, so that can't change at all.  I'm wanting to migrate this to the switchyard platform, but i have troubles finding how to handle http session state in my service.  any help would be most appreciated.

       

      thanks,

      -mark-

        • 1. Re: statefull http service
          igarashitm

          Hi, I don't think generic http binding has any way to access servlet http session (note it's servlet specific API), but you can keep having servlet and inject SwitchYard services as a CDI bean into it, and then packaging them together into war. Please take a look at quickstarts/demos/orders for the war packaging.