|
Hi,
We have an issue with using threads in a servlet which has raised a few
questions:
Firstly are servlets allowed to spawn threads?
Yes .
I know EJBs are not but dont think the same applies to servlets
Secondly - provided threads in servlets are allowed should they be able to
access objects via local JNDI names. The problem we are encountering is because
the threads originally used global JNDI names to lookup objects and this
worked fine. But when we changed them to use local names the lookup fails - is
this correct behaviour (our web container is websphere which is J2EE compliant).
We are guessing that either the servlets thread has access to the servlet
context but spawned threads do not OR this is a bug
What is the exception you faced
??
Lastly (and a little off-topic) - my understanding is that neither
EJBs nor any supporting classes which they use should ever spawn threads.
But collegues are certain that the supporting classes are free to use threading
- which view is correct?
The supporting classes are free to use threading
|
- Threading in servlets Gareth Jones
- Can a Servelt Run a Batch File? Scott Murray
- Can a Servelt Run a Batch File? Ravisankar.N
- Re: Threading in servlets Ravisankar.N
- Re: Threading in servlets Gene Chuang
- Difference between JSP and SERVLET?? Bikash Paul
- Re: Difference between JSP and SERVLET?? Claude HONNORE
- Re: Threading in servlets Tim Panton
