Howdy,
One thing to note is that a servlet container and a J2EE server are not
the same.  Tomcat is the former but not the latter.  Weblogic,
websphere, jboss, etc. are the latter.  They implement the whole J2EE
spec which places more restrictions on thread creation by applications:
read the spec if you want the actual text (I don't remember if
off-hand).

In a servlet containr, you can create your own threads.  Just like in
other environments, you must be careful with how you manage them,
especially making sure they are appropriately terminated by your
application or by the JVM itself if they're daemons.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: David Wall [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 30, 2003 12:15 PM
>To: [EMAIL PROTECTED]
>Subject: Threaded servlets okay in a compliant container?
>
>I recall reading that conformant servlets and such (EJBs?) do not
create
>their own threads, something about being a container issue.
>
>Does anybody know the primary objection to launching threads that take
>on a life of their own?  The container doesn't really need to manage
it,
>per
>se.
>I suppose a container can drop servlet objects from memory, but as that
>wouldn't necessarily affect a daemon thread, it seems that doesn't harm
> launching them at startup, and of course the servlet could even stop
the
>threads when told to destroy itself if that makes sense.
>
>Does anybody know if most servlet containers today (Tomcat 4+,
WebLogic,
>WebSphere...) have a real problem with such new threads being created
or
>not?  What would be the risk in my using them?
>
>I previously posted this by accident on the PostgreSQL JDBC list and I
got
>mixed answers.  Some say it's fine, others say there's no spec saying
such
>threads can't be used, and others say that BEA complained about support
>issues related to apps that created their own threads.
>
>Any feedback is much appreciated.
>
>Thanks,
>David
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to