![]() |
|||||||||||||||||
| |
|
|
|||||||||||||||
|
Transaction Objects
Data involved in each request-responae cycle is encapsulated in 3 transaction objects
In most applications you don't need to interact with these objects However, sometimes you want to
Each request-response cycle takes place in a unique context WO assignes a unique number to each transaction called a contextID This ID makes each instance of the WOContext class unique The instance contains all the data required to complete a specific transaction Session page cache is a cache of context objects, each accessed by their contextID Accessing request and response objectsinvokeAction(), appendToResponse() and takeValuesFromRequest() pass these objects so you can access them directly awake(), sleep() and the components constructor must request them explicitly Not available to the application constructor or the session constructor because they don't exist yet They only exist in any context after the 1st awake() Accessible to any method via the context HTTP headers in the request object a header is a key/value pair
Some common headers contain the user language preferences and the identity of the browser You can set headers in the response object CookiesYou can add a cookie to the response at any time
You can get a cookie back from a new request
A cookie you generate in a response is only useful if it comes back to your application to communicate data about this user Problem - cookies can outlive individual
sessions or even application instances
Page updated August 22, 2004
|
||||||||||||||||
|
|
|||||||||||||||||