Results 1 to 2 of 2

Thread: When is a requestScope variable actually destroyed?

  1. #1
    Join Date
    Jan 2006
    Location
    Seattle, Washington
    Posts
    467

    Default When is a requestScope variable actually destroyed?

    I know what "request scope" means in the context of web applications, and I'm sure that Web Flow implements it the same way as other web frameworks. However, I'm trying to rationalize this understanding with the statement that I see in the documentation, which is:

    "Request scope gets allocated when a flow is called and destroyed when the flow returns."

    When the flow returns? Does the end of a single request correspond to when the flow "returns"? What exactly does this mean?

  2. #2
    Join Date
    Nov 2008
    Posts
    742

    Default

    So you press a button on a page. This might start a new flow, or resume a flow already in progress. Either way, request scope gets allocated. Server-side processing occurs, and eventually a page needs to be rendered. When the page gets rendered (or if a redirect occurs), then request scope is destroyed. So it's still for the duration of an HTTP request.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •