Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
Controlling WebSpeed Transactions : Primary and secondary Web objects : State-aware Web objects and persistence
 

State-aware Web objects and persistence

You might have noticed that the scenario in Running primary and secondary Web objects seems to have Web Object A running again and again. This is not necessarily what happens.
Typically, the first time a state-aware Web object is executed, it initializes. The final step of initializing is to call its process-web-request method procedure and return to the caller after completing execution. However, the Web object typically remains in a suspended but active state known as persistence. In this persistent state, any of the Web object's method procedures, including process-web-request, can be executed by any other Web object.
The next time that the persistent Web object services a request, only its process-web-request procedure is executed (without the initialization code), and generally this procedure does not iterate or recur.
The primary Web object generally runs the secondary as a stateless Web object, which does not persist after execution. The usual course is to send a Web page for display that does not POST data back to the secondary Web object. However, the page might link back to the primary Web object for service by some other persistent Web object in the transaction.