Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 25th, 2006, 04:36 AM
Registered User
 
Join Date: Jul 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to spmanivel
Default how can i create Single Thread in servlet

How do create single thread in servlet?.

Kindly reply.

Mani
 
Old July 25th, 2006, 06:14 PM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Same way you would create multiple threads -- just do it once :).

Actually, the J2EE standards say threads should not be created in servlets, though no servlet containers enforce this restriction. It's still a bad idea, though, because it can easily lead to orphaned threads that will eventually bring your server down. Instead if you want to perform tasks asynchronously, you should use Java Messaging Service (JMS).

Jon Emerson
http://www.jonemerson.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
By Default Servlet is Single or Multi-Thread Model bikash Servlets 6 September 3rd, 2009 02:35 PM
How to create 2 Frames in a Single window+Java kotaiah Java Basics 0 August 13th, 2007 10:07 AM
How to make servlet single threaded? harshala Apache Tomcat 0 June 20th, 2007 12:28 AM
how to make servlet single threaded? harshala Apache Tomcat 0 June 19th, 2007 08:51 AM
how can i implement thread in servlet?. spmanivel Servlets 3 September 14th, 2006 08:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.