views:

20

answers:

2

I would be interested in some timing details. FOr example I place in session some container, whcih can keep different data. I do change of content of the container frequently. How can I assure that the container session value get replicates across nodes for any change?

A: 

You don't need to make sure; that's the application server's job.

The J2EE specification doesn't deal with session-information synchronization amongst distributed components.

Theoretically, all you have to do is code thread-safe. In your example, simply make sure that access to the container is synchronized. If your application server is bug-free, then you can safely assume that the session information is properly replicated across all nodes in a seamless manner; if your application server has bugs around session synchronization... well... then nothing is really safe anymore, now is it.

Isaac
Sorry, for some reason you got synchronization as keyword. I asked something different. Actually I dug in app servers specific and found an answers, thanks for trying anyway
Dmitriy
A: 

Application servers use different strategies to synchronize session information between nodes. Session content can be considered as dirty and required synchronization at put data in session get data from session get data from session falls in two categories as get structured object get scalar object or immutable object So if session data get modified indirectly by modifying an structured object, then simple re-read it from session can assure that the object content got replicated.

Dmitriy