Hi Jill,

>  This poses a big problem however if the
> user has more than one browser up.  Then the bean is shared and
> data gets clobbered.  I cannot for the life of me figure out a
> good solution to this.
>
There is no easy solution to this, I believe. It's also not exclusively a
problem with beans - it's more fundamental - and actually boils down to two
problems:
1. Identifing which of your windows is responsible for an object and can
edit and save it (session/ownership)
2. Stopping other windows/pages from clobbering the object (locking)

To work around (1) we found it necessary to write our own session
management. We were able to justify this not only because of the need to
prevent different windows on the desktop clobbering each others' server-side
state, but also becase we needed a way for the same user to connect to two
or more different instances of our system (ie production and test)
side-by-side on the same desktop.

We implemented a sub-session object at the window level (but server-side)
that is layered on top of the normal session object. This effectively allows
"window" scope, with the downside that session scope (JSP or otherwise)
becomes almost irrelevant for our purposes. Everything goes though the
subsession, but this is, of course, not supported by JSP and therefore we're
on our own. We're not using beans at the moment, so this aspect doesn't
bother us, although of course it will when we do.

Solving (2) is also difficult. Some people use a system of timestamps to
prevent data being clobbered but this has the disadvantage that sometimes
changes must be rejected. The alternative is to acquire a lock that exists
between successive requests, but then this has to be managed as well, with
all the usual issues such as what happens if the  browser window is closed,
is backed out or crashes without releasing the lock etc. etc. We currently
use a simple applet to control this aspect of the interaction.

Although such mechanisms are perhaps a bit off-topic, I would also be
interested in hearing from anyone that has a more standard solution, even if
it means we've gone down the wrong track   :-/     What's the chance that
session-tracking cookies could be made window-specific, or even that JSP
would provide a something like window scope  ;-)

Geoff Lewis
Finatec Financial Software Solutions AG
Tel: +49 9371 97860
Web: http://www.finatec.de
Email: [EMAIL PROTECTED]


begin 600 winmail.dat
M>)\^(CL0`0:0"``$```````!``$``0>0!@`(````Y`0```````#H``$(@`<`
M&````$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`06``P`.````SP<+``H`
M$0`[`#,``P!M`0$@@`,`#@```,\'"P`*`!$`.P`X``,`<@$!"8`!`"$```!%
M1CDU0D9#,31".3%$,S$Q.4%&.#`P,3`U03,Y,48T.0`M!P$$@`$`$@```%)%
M.B!*4U`@86YD($)E86YS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((`8``````,````````!&`````%*%``#S
M%0``'@`%@`@@!@``````P````````$8`````5(4```$````%````."XP-```
M```#``:`""`&``````#`````````1@`````!A0````````L`!X`((`8`````
M`,````````!&``````Z%`````````P`(@`@@!@``````P````````$8`````
M$84````````#``F`""`&``````#`````````1@`````8A0```````!X`"H`(
M(`8``````,````````!&`````#:%```!`````0`````````>``N`""`&````
M``#`````````1@`````WA0```0````$`````````'@`,@`@@!@``````P```
M`````$8`````.(4```$````!``````````,`\3\)!````P#]/^0$```#`"8`
M``````,`-@```````P"`$/____\"`4<``0```#````!C/41%.V$](#MP/49)
M3D%414,[;#U35$%21T%412TY.3$Q,3`Q-C4Y-3%:+3@X.``>`#A``0````<`
M``!'14]&1DP``!X`.4`!````!P```$=%3T9&3```0``',#!>\@"=*[\!0``(
M,#"D,02=*[\!'@`]``$````%````4D4Z(``````>`!T.`0````X```!*4U`@
M86YD($)E86YS````'@`U$`$````R````/#@Q,S5#0S,P0T1$1$0Q,3$Y0D,Y
M,#`Q,#1"-#5$1CA",3DV-44Q0%-405)'051%/@````L`*0``````"P`C````
M```#``80#P8TU@,`!Q"J!P```P`0$``````#`!$0`````!X`"!`!````90``
M`$A)2DE,3"Q42$E34$]315-!0DE'4%)/0DQ%34A/5T5615))1E1(155315)(
M05--3U)%5$A!3D].14)23U=315)54%1(14Y42$5"14%.25-32$%2141!3D1$
M051!1T544T-,3T(``````@%_``$````R````/#@Q,S5#0S,P0T1$1$0Q,3$Y
D0D,Y,#`Q,#1"-#5$1CA",3DV-44Q0%-405)'051%/@```#B`
`
end

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to