I followed this same issue up with BEA, basically once you have made the
call there is little you can do to stop it. Also, you would need to keep a
callback reference to the client and then also a handle to the EJB that you
wish to stop(for your proposed callback method). This in itself could be
dangerous, especially if the ejb call is within a transaction.
Another possible solution is to create transaction waypoint objects (similar
to oracle savepoints). The waypoints could be stored in a JNDI name space
(usually on the server). The EJB can update the waypoints thus letting the
client know WHERE the ejb is up to. Also, a client could attempt to get to a
waypoint prior to the ejb and setting some status info on the waypoint that
will tell the ejb to rollback the transaction and return. At the conclusion
of the transaction the waypoints can be terminated (or the client could
"consume" them as they are read..)
This is just another option.However, the above solution isn't very practical
if your transactions are short lived, it would be more appropriate for long
lived transaction.
Rob Masters
Sun Certified Java Programmer
Comcare Australia
(w) 02 6275 0632
(f) 02 657 4045
[EMAIL PROTECTED]
http://www.comcare.gov.au
> -----Original Message-----
> From: C Chow [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, 25 May 1999 5:35
> To: [EMAIL PROTECTED]
> Subject: Canceling method calls
>
> Hi EJB gurus:
>
> Maybe someone had already seen this problem before. Consider a
> scenario where a client calls a business method on an EJB. This business
> method takes a long time to process (a complex query) and
> at some point in time the client decided to cancel this process.
>
> The client cannot tell the EJB to stop the process since it is blocked
> by the still-running process.
>
> The EJB cannot use thread to process the long-running process to unblock
> itself because it is dangerous (and prohibited) for an EJB to create a
> thread.
>
> The way that I can think of to solve this is for the server to
> periodically
> checks the client to see if there is a cancelling method request, but this
> method is very costly. (possible?)
>
> Any suggestions?
>
> Thanks very much.
>
> Chad.
>
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ==========================================================================
> =
> 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".
===========================================================================
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".