File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes converting threads to Spring threads 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 "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: 84
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: 17234
    
    1

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 - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Raaja Gotluru
Ranch Hand

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

Thanks for the reply. I will try accordingly.

--raaja g
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: converting threads to Spring threads
 
Similar Threads
Spring WEB MVC 3.0 using org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport
Give the easiest example which differentiate "interface" and "abstract class" in Java.
hibernate 4 and spring 3.1.2 issue with LocalSessionFactoryBuilder
Wake up a thread
Groovy Starting