This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes Which Class should I use to replace Thread in Web Container ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Which Class should I use to replace Thread in Web Container ?" Watch "Which Class should I use to replace Thread in Web Container ?" New topic
Author

Which Class should I use to replace Thread in Web Container ?

walter wang
Ranch Hand

Joined: Jun 02, 2001
Posts: 150
As far as I know. Usually it is not allowed to new a Thread in Web container?

Then which class could I use to replace java.lang.Thread in Web container?

Thanks and Rgds
Wang Yan

What I am try to do is

in a Servlet to spawn a thread which will execute a task costing about 15 mins).

So I need spawn a thread to execute this time consuming task.
[ October 24, 2005: Message edited by: walter wang ]
[ October 24, 2005: Message edited by: walter wang ]

public class Walter { public boolean is_Working_Now (boolean is_boss_Coming) { return is_boss_Coming; }
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3700
    
    5

I'm not quite sure what you're asking, what are you trying to do in a web container that requires multiple threads?


My Blog: Down Home Country Coding with Scott Selikoff
Sabarish Sasidharan
Ranch Hand

Joined: Aug 29, 2002
Posts: 73
This can be container specific. WAS for ex supports Async Beans (thread pools). But you will be using app server specific stuff so if possible hide them behind a layer of your own.


Sab<br /> <br />Perfection does not come from belief or faith. Talk does not count for anything. Parrots can do that. Perfection comes through selfless work.<br />Swami Vivekananda
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which Class should I use to replace Thread in Web Container ?
 
Similar Threads
Thread creat memory leak?
Send msg to JMS
How to inject Beans into HttpSessionMutexListener
Relation beteween instance of TransactionProxyFactoryBean and target object
How to pass variable in jsp to java script function ?