----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Dear Nick
I greatly appreciate your detailed response to my problems.
Unfortunately you don't address the issue which worries me the
most.
My main question is whether there is a built-in way of protecting
oneself from a user who refreshes his browser many many times?
(I should have left all the other questions for other threads.)
I'm contemplating running a time check on the session object and
forcing the user to wait 5-10 seconds before using the same servlet
twice, but -- is this necessary? advisable? or even valid? Am I
somehow circumventing default protections?
> Are you intializing all your locally-scoped variables?
I can't claim not to have missed one or two. But -- why do you ask?
The site is quite comfortably serving a few hundred user's per day.
So I don't see how your question is relevant. I'm busy confirming all
the details so I can meet future demand. (In January it has to ramp
up to 10s of thousands per day.) Perhaps, your question is
relevant, but I don't understand how.
> You should never synchronize "until desired consistency is
> achieved". You should always know why you are synchronizing.
> Remember when you say "synchronize", you are implicity saying
> "synchronize(this)": the entire object is getting locked, not just
> the method.
The crude reality is that this is a VERY rush job. We are currently
doing user testing. In future we will examine the 'sychronization'
issues one by one. I was concerned that by sort of forcing a single
thread model I was causing unexpected side effects. If so, I don't
really understand how that would produce the behaviour I'm seeing.
> Don't forget to commit every jdbc transaction, even "select"s:
> because jdbc considers even reads can trigger writes.
Interesting point, but MySQL has no 'commit'! What I'm doing is
freeing my connections back to the dbConnectionBroker pool. Do I
need to satisfy JDBC as well?? I hadn't thought of that.
> And are you using a "finally" clause to ensure you are committing
> and closing your cursor?
Yes, absolutely, hence my severe concern over what I'm seeing! If I
hit <ctrl-r> a half a dozen times then at least four out of six times, the
code never executes as far as the 'finally' -- it just ceases to
execute........ somewhere!
Sure hope someone out there can help me, it's got me pretty
worried.
Rgds,
Hasan
Hasan
~~~~~ HASAN BRAMWELL
Address: Casilla 17-17-1004, Quito, Ecuador Tel : (593) (2) 372-748
Internet: [EMAIL PROTECTED] or : (593) (9) 722-221
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]