I think you misunderstand things a bit here (or maybe the spec wasnt clear, as often)
servlet spec 2.5 (the current one, and the one tomcat 6 is implementing) states in SRV.14.2.2 Web Application Environment (9.11 now merily point to this chapter): "Java EE defines a naming environment that allows applications to easily access resources and external information without explicit knowledge of how the external information is named or organized." ... "This type of servlet container must support lookups of such objects and calls made to those objects when performed on a thread managed by the servlet container. This type of servlet container 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 not recommended, as it is non-portable." So the distinction between application-created and container-created thread is that application created thread may not have the ability to access container managed resources (ejb related stuff, something 90% of us will never need (*thankfully*)) but the servlet containers will have to support it in next version (which I assume is 3.0 and is scheduled to the end of 2008, so effectively 2009). The ability to access such resources from custom threads is not portable. The threads themself are absolutely portable. I also doubt that its possible to prevent an application from thread creation, maybe by some obscure security manager settings, but i doubt it, since it will probably break 90% of existing 3 tier webapps. Without the ability to create threads you won't be able to communicate via corba or rmi or do anything useful in your webapp ;-) regards Leon On 7/17/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote:
2007/7/17, Leon Rosenberg <[EMAIL PROTECTED]>: > > you can create threads in tomcat. It's not recommended unless you know > what you are doing, but you can. > It seems that you are right... and not :-) You can create threads in a servlet container, but it is not portable. As stated in Servlet 2.4 specification, section SRV.9.11: <snip> This type ofservlet container 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 not recommended, as it is non-portable. </snip> Antonio
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]