I have a quick question regarding the scope of a bean used in a search form. The search
bean holds a fixed number of results (i.e. the first 100 results) and since it is not an
unbounded query, I'd like to make it stateful so I don't have to re-query every
time the user changes page number, or triggers some other action.
So, I could use the conversational scope, but that seems overkill since it is only one
page. I know some of the examples use Session scope but I don't want the results
lingering round in the session.
I could use a conversation since there are only a couple of links out of the page to put
the end conversation tags on.
I did take a look at page scope, but it cannot be a stateful bean, but it would be nice to
have a bean that lasted for the duration of the page and could be stateful.
Which leads me to another question. Whats the difference between event and page scope? For
that matter, when you have a stateless bean, why have scope at all since I thought they
were all shared between threads since they are stateless? My thinking was that a pool of
stateless beans could be used to provide the bean to threads that needed it, and since it
was stateless, after the call, it can be returned to the pool. I realize that this is
probably an implementation issue on the application server, and may not apply across all
servers.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045644#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...