0 Replies Latest reply on Jul 26, 2011 11:29 AM by Tom Bryan

    Search page: long-running conversation or not?

    Tom Bryan Newbie

      I'm looking for advice.  If you have a search page backed by an EntityQuery, do you open a long-running conversation when the user first visits the page?

      I have a page where the user can enter search criteria and perform an ad hoc query.  The search results are fed by an EntityQuery.  Initially, I started a long-running conversation when the user first visited the page to help manage state.  But then I realized that there was no good point for ending such a conversation.  I either have conversations that are too long (spanning more than one unit of work), or I end up with a bunch of abandoned conversations.

      I tried recoding it so that I don't don't keep any state on the server after I render the search page.  That seemed to work except that the data model selection no longer works correctly because the same DataModel instance isn't available on postback.  I tried putting the EntityQuery in PAGE scope instead of CONVERSATION, but then the entity query seems to end up with an invalid EntityManager instance on postback.

      Conversation handling on a search page seems like such a fundamental problem, but I can't seem to find any recommendations addressing this issue.  Is everyone just using a conversation and not worrying about abandoned conversations?  Or is there a way to make EntityQuery work in PAGE scope?