Tim Fox wrote:
>
> I'm not doubting you, but can you tell us how you came to the conclusion
> that the EJBHome stub is not thread-safe?
>
> It's just that, if true, I have lots of code to rewrite (the Home-cache
> pattern is very popular) :(
Tim, As I already stated, practical experience.
What actually happened was that my app could be crashed reliably by
simultaneously initiating two requests from different browsers, and when I
synchronized use of EJBHome it became reliable again.
Incidentally it's also necessary to synchronize around calls to EJBObjects
because the servlet engine will happily dispatch two requests on separate
threads as a result of extra clicks in a single browser window.
BTW, there's no big redesign needed - just put
synchronized(myHome){
...
}
around each use of myHome.
========================================
Ian McCallion
Alexis Systems Limited
Romsey, UK
Tel: +44 1794 514883
Fax: +44 1794 501692
========================================
===========================================================================
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".