aspose file tools
The moose likes Spring and the fly likes TaskExecutor.exucute(Runnable) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "TaskExecutor.exucute(Runnable)" Watch "TaskExecutor.exucute(Runnable)" New topic
Author

TaskExecutor.exucute(Runnable)

Rakesh Basani
Ranch Hand

Joined: Jun 04, 2012
Posts: 38
hi guys..

I am stuck with one doubt. In general Threads concept, if we call Thread.start() two times continuously then the second Thread.start() will throw IllegalStateExeception.
In the same way when I call TaskExecutor.execute(Runnable) two times continuously, its not throwing any exception.. Please clarify me..


Thanks in advance.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1282

You are comparing an Executor to a Thread. They are not the same.

When calling Thread.start() two times you are trying to start the same thread twice this is not what happens when you call TaskExecutor.execute(Runnable) twice.

Please read the relevant part of the documentation and if that does not clear it up, post back with any questions.

http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/scheduling.html#scheduling-task-executor


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: TaskExecutor.exucute(Runnable)
 
Similar Threads
Thread na d Runnable with run method
solve my probelm in creatting thread
SWT window freezes swing windows
Methods for threads?
WA #1.....word association