Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8424679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:03:59+00:00 2026-06-10T04:03:59+00:00

Background: I use Spring 3.0.x in my Websphere 7 applications to grab the CommonJ

  • 0

Background: I use Spring 3.0.x in my Websphere 7 applications to grab the CommonJ WorkManager and TimerManager. I use these to do arbitrary tasks at certain intervals in my deployed applications.

Problem:

I just learned that when setting a bean in the scheduler like so:

<bean id="threadTest" class="test.ThreadTester" />

<task:scheduled-tasks scheduler="myTimerExecutor">
    <task:scheduled ref="threadTest" method="execute" fixed-delay="300000" />
</task:scheduled-tasks>

In Websphere, it will run the ThreadTester class directly in the TimerManager thread pool. This thread pool has a much higher priority (and fewer threads) than the WorkManager thread pool. I want the thread to run with the WorkManager instead to be at the proper priority and use the proper resources set up for threads.

As an alternative, instead of setting the bean in the scheduler like above, I can use the Spring @Scheduled annotation in the ThreadTester class like so:

@Scheduled(fixedDelay = 300000)
public void execute() {
    ...
}

Question:

Does using the @Scheduled annotation make the scheduled class run in the TimerManager thread pool or the WorkManager thread pool?

If it runs using the WorkManager, then great! That solves my problem. However, if it is using the TimerManager to directly execute the class, then I guess I’ll have to write some wrapper to correctly call the WorkManager.

Thanks for any help!

Edit: Here I include how I set up the scheduler and executor with the Websphere 7 commonj implementations:

<bean id="myTaskExecutor" class="org.springframework.scheduling.commonj.WorkManagerTaskExecutor"> 
    <property name="workManagerName" value="wm/default" />
    <property name="resourceRef" value="true"/>
</bean>

<bean id="myTaskScheduler" class="org.springframework.scheduling.commonj.TimerManagerTaskScheduler"> 
    <property name="timerManagerName" value="tm/default" />
    <property name="resourceRef" value="true" />
    <property name="shared" value="false" />
</bean>

<task:annotation-driven executor="myTaskExecutor" scheduler="myTaskScheduler" /> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:04:01+00:00Added an answer on June 10, 2026 at 4:04 am

    Well, I found out that yes, indeed, @Scheduled beans are run within the TimerManager thread pool on Websphere 7.

    All I had to do was spit out the stack trace of the thread to see the hierarchy in which it was called.

    for(StackTraceElement element: Thread.currentThread().getStackTrace()) {
        logger.debug(element.toString());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement to use Spring STS with a black background and green
First, a little background. I have two ASP.NET web applications that use SQLServer session
Coming from a .NET background I'm use to reusing string variables for storage, so
Background I use JScript (Microsoft's ECMAScript implementation) for a lot of Windows system administration
Background: I use rails g scaffold hotel name stars:integer to start fast (and insert
A little background: I use PowerShell on windows xp at work and I set
Is it possible/recommended to use background worker threads with the web browser control? I
If I use @import icon/*.png; @include all-icon-sprites; I can use background-position: sprite-position($icon, foobar); to
I've been following a tutorial that explains how to use background for a button
I have to design a form with an input inside it. I use background

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.