Hi Folks,
I have a PASOE instance which is used by both application and REST service. We have setup sessionConnectProc and SessionActivateProc in openedge.properties. These startup procedure works fine from application but not from REST service, sequence of these procedure execute differently in REST.
In Connect procedure, we have created some context which uses in Activate procedure. When we run application connect procedure execute first and creates context that uses by activate procedure further. but when we run Rest service activate procedure executes first and tries to find context which throws error.
Can anyone have idea why it is behaving differently in REST service and what is the sequence of execution of these procedures?
Hi,
REST services can only use the session-free application model. Connection procedures do not apply to this model, so they are ignored. REST services are most appropriate when requests are mostly independent of each other so a large amount of context does not have to be maintained between requests. For services where a great deal of state information needs to be set up in a connect procedure and maintained over multiple requests, consider other service transports such as SOAP or AppService (classic AppServer) / APSV (PAS). These transports can use the session-managed application model where a connect procedure can be used to set up context management.
I hope this helps you.
Hi,
REST services can only use the session-free application model. Connection procedures do not apply to this model, so they are ignored. REST services are most appropriate when requests are mostly independent of each other so a large amount of context does not have to be maintained between requests. For services where a great deal of state information needs to be set up in a connect procedure and maintained over multiple requests, consider other service transports such as SOAP or AppService (classic AppServer) / APSV (PAS). These transports can use the session-managed application model where a connect procedure can be used to set up context management.
I hope this helps you.