Re: second thread call to stateful session bean

"Mirchandani, Vishal" <[email protected]> Thu, 12 Aug 2004 10:03:55 -0400
Newsgroups gmane.comp.java.sun.ejb.general
Message-ID <526AAF6DCD9B8542A951993A2782329301917F89@synbomexch1>
Hey Ashwini,
In case you are not able to trade up the server operation, you can handle
the same at the client browser itself or at the event Handler, in case
you have one.

Method 1:
In your browser, have a transparent div. When the button is clicked,
activate the div(visibility:visible) with maximum zIndex. This way the page
gets locked . Or
also you can have a message on the div saying: "Please wait".
When you receive the response, hide the div again.

Method 2:
Also it can be done in your architecture layout. Say for instance the web
page(e.g. jsp) submits the request to a servelet which in turn calls the
other classes
or the EJB. In this servelet you set a flag for processing and in case the
flag is true. Ignore all user intercepts. After processing, set the flag to
true and the servlet
will start taking responses.

Method 3:
Try and handle the exception in the bean itself and kill the transaction.
But this is not an efficient method as the server should never get a call in
case a request is being
processed. So 1 and 2 should work out for you.


Warm Regards,
Vishal Mirchandani
----------------------------------------------------------------------------
--------------------------------
"I'm having amnesia and deja-vu at the same time... I think I have forgotten
this before..."

-----Original Message-----
From: Kalra, Ashwani [mailto:[email protected]]
Sent: Thursday, August 12, 2004 7:16 PM
To: [email protected]
Subject: second thread call to stateful session bean


hi,
I have web page in which use clicks of one hyperlink , this operation is
time consuming so user clicks immediately on some other link and I get the
above exception on Oracal9i AS 9.03.  All the requests goes through the
stateful session bean. How to handle it gracefully.


Thanks & Regds
 Ashwani

Ext: 1582






Our name has changed. Please update your address book to the following
format: "[email protected]".

This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is intended only for the person
to whom it is addressed. If you are not the intended recipient, you are not
authorized to read, print, retain, copy, disseminate, distribute, or use
this message or any part thereof. If you receive this message in error,
please notify the sender immediately and delete all copies of this message.


===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".




____________________________________________
Confidential:  This electronic message and all contents contain information
from Syntel, Inc. which may be privileged, confidential or otherwise
protected from disclosure. The information is intended to be for the
addressee only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited.  If you
have received this electronic message in error, please notify the sender
immediately and destroy the original message and all copies.

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".