Hi,

This is a hypothetical question, but it's interesting to me if anyone can
come up with a solution and what that solution would be.

A few facts and requirements:

1) Suppose you have 2 machines. One must serve as your web server and the
other must serve as your EJB server.
2) Suppose you must keep track of some sort of session data for each client.
How you store the session data is flexible to a point... You want to take
advantage of stateful sessions for whatever reason (maybe your EJB server
has more resources or something like that).
3) You obviously have a remote reference to your stateful session EJBObject
in your web tier.
4) For whatever reason, you anticipate that you will want to restart your
web server now and then while there will be some moderate traffic to it
going on. Yet, you don't want to make all the clients lose their state.
5) You can use a cookie if you want to remember which client was which when
the server restarts.
6) You have the option of storing the remote references to you stateful
session EJBObject by getting EJBObject.getHandle() and storing it on the web
server machine in a serialized form.
7) No, you can not buy another web server and cluster them! Let's say there
is no more money left.

How do you catch "server/web app shutdown" event with no non-portable code,
so you can go through all your sessions and save the remote references to
your stateful beans on the EJB tier on hard disk so when the server starts
back up you would be able to restart the entire app without making the
clients lose their state?

Yes, this way of a contrived situation, but I am just very interested in how
this could be accomplished.

Anyone?

Thanks,
Yaakov.




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

Reply via email to