Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

converting threads to Spring threads

 
Raaja Gotluru
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my current project Threads were implemented using Thread class (which were implemented long back by some other) as each job will be allocated with a new Thread due to this a lot of threads will be created which are making a performance issue. I need to execute the threads using spring Thread pool concept. That is my task is to convert Thread class threads to Spring Threads. Can anyone please guide me in achieving this.

Thanking you

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the link to schedule and task jobs in Spring documentation

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

This is how you can create an executor pool of threads to run POJO code. or even simple things like @Async on a method you want always run in a separate thread.

Mark
 
Raaja Gotluru
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

Thanks for the reply. I will try accordingly.

--raaja g
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic