WITHIN:

Michael McGrady

My thought would be to initialize a state object and put it in either
the http session or a session bean and then each page can work with
this state object as a general filter when executing business logic. This way, each form and link will be just the core data needed for
that particular request, without all this general information. The
state object would either be initialized on an entry action or at the
start of every action, depending on what is feasible at the time.


Now, I haven't done this so far, because my manager (use the term
loosely) told me that using http sessions will cause server affinity
in a cluster.


You have made, I understand, the choice not to save "working" data client-side. Doing so solves all the problems of server affinity, obviously. But, you/we are talking about saving the "working" data server-side.

Server affinity is normally thought of as the situation where you save data in /memory /on a /webserver/. This is because you can hardly cluster webservers if the data is kept in ram on a webserver. Right?

You could do a lot with that model, i.e. saving data in ram on a machine, including all sorts of data shareing, but clustering the webservers or machines holding the data is not one of them.

So, if you don't want to have the problem of server affinity and you reject client-side solutions, you need to find a different persistence idea than webserver ram. So, you have to decide what persistence mechanism other than webserver ram you want.

If http sessions are out, I suppose I could lean
towards session beans. First I would like to challenge his point on
sessions, and if that doesn't pan out, discuss if stashing this in
sessionbeans is the right way to go.


Since you want to first challenge his point on sessions, I will stop here. Insofar as http sessions are a ram solution on the webserver, your "manager" is definitely right. I could see a hybrid solution where you use multi-threading to work off ram and then to provide some other persistence in a background thread.

Hope this is helpful.

Michael McGrady



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to