This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Spring and the fly likes converting threads to Spring threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "converting threads to Spring threads" Watch "converting threads to Spring threads" New topic
Author

converting threads to Spring threads

Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 118
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

Joined: Feb 05, 2001
Posts: 17276
    
    6

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


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Raaja Gotluru
Ranch Hand

Joined: Mar 02, 2010
Posts: 118
Hi Mark,

Thanks for the reply. I will try accordingly.

--raaja g
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: converting threads to Spring threads
 
It's not a secret anymore!