Also ... (From 2.3 spec)

In SRV.1.2 What is a Servlet Container?
... "For example, high-end application servers may limit the creation of a Thread object, to insure that other components of the container are not negatively impacted."


SRV.9.11 Web Application Environment
... "Such servlet containers should support this behavior when performed on
threads created by the developer, but are not currently required to do so. Such a requirement will be added in the next version of this specification. Developers are cautioned that depending on this capability for application-created threads is nonportable."


-Tim

Shapira, Yoav wrote:

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]





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



Reply via email to