Results 1 to 2 of 2

Thread: Does spring have any build-in thread pool mechanism for ap?

  1. #1
    Join Date
    Jun 2005
    Posts
    8

    Default Does spring have any build-in thread pool mechanism for ap?

    Hello,

    I am wondering whether spring framework has any build-in thread pool mechanism which I can use in my application for thread management. If yes, where can I find the related information? Thanks a lot.

  2. #2
    Join Date
    Nov 2004
    Location
    Hilversum - The Netherlands
    Posts
    1,054

    Default Re: Does spring have any build-in thread pool mechanism for

    Quote Originally Posted by dnlchou
    Hello,

    I am wondering whether spring framework has any build-in thread pool mechanism which I can use in my application for thread management. If yes, where can I find the related information? Thanks a lot.
    Spring doesn`t provide threadpoolmanagement as far as I know of. There are different solutions:
    1) you could write it yourself
    2) you could use Quartz. Quartz is a scheduler for Java and if you need Scheduling, then Quartz could be a solution. Quartz gives you control on the threadpools being used for executing jobs.
    3) you could use the ScheduledThreadPoolExecutor that is part of java 5.0. I`m currently writing some Springbeans that make using the ScheduledThreadPoolExecutor easier. There also is a java 1.4 backport of the concurrency library. If you need scheduling, this could be a alternative to 2.
    4) use the ThreadPoolExecutor that is part of java 5.

    But what do you need? Do you need scheduling? Or do you want to have control on the resources that are executed? I`m thinking about writing a Spring plugin for the last one: it wraps a service and provided threadmanagement, eg:

    Code:
    @Active(priority=2,poolSize=10)
    class SomeService{
         void doSomethingHeavy(){....}
    }

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  3. Replies: 3
    Last Post: Apr 14th, 2005, 11:59 PM
  4. Sessions closing after commit
    By bendg25 in forum Data
    Replies: 0
    Last Post: Mar 21st, 2005, 04:38 AM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •