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 373685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:19:56+00:00 2026-05-12T14:19:56+00:00

I would like to use a WorkManager to schedule some parallel jobs on a

  • 0

I would like to use a WorkManager to schedule some parallel jobs on a WebLogic 10.3 app server.

http://java.sun.com/javaee/5/docs/api/javax/resource/spi/work/WorkManager.html

I’m finding the Oracle/BEA documentation a bit fragmented and hard to follow and it does not have good examples for using WorkManagers from EJB 3.0.

Specifically, I’d like to know:

1) What exactly, if anything, do I need to put in my deployment descriptors (ejb-jar.xml and friends)?

2) I’d like to use the @Resource annotation to inject the WorkManager into my EJB 3 session bean. What “name” do I use for the resource?

3) How do I configure the number of threads and other parameters for the WorkManager.

My understanding is that the underlying implementation on WebLogic is CommonJ, but I’d prefer to use a non-proprietary approach if possible.

  • 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-05-12T14:19:56+00:00Added an answer on May 12, 2026 at 2:19 pm

    First, you’ll find the documentation of CommonJ, an implementation of the Timer and Work Manager API developed by BEA Oracle and IBM, in Timer and Work Manager API (CommonJ) Programmer’s Guide. They provide a Work Manager Example but it’s not injected in this document.

    1) What exactly, if anything, do I need to put in my deployment descriptors (ejb-jar.xml and friends)?

    According to the Work Manager Deployment section:

    Work Managers are defined at the
    server level via a resource-ref in the
    appropriate deployment descriptor.
    This can be web.xml or ejb-jar.xml
    among others.

    The following deployment descriptor
    fragment demonstrates how to configure
    a WorkManager:

    ...
    <resource-ref>
       <res-ref-name>wm/MyWorkManager</res-ref-name>
       <res-type>commonj.work.WorkManager</res-type>
       <res-auth>Container</res-auth>
       <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    ...
    

    Note: The recommended prefix for the JNDI namespace for WorkManager
    objects is java:comp/env/wm.

    Check the WorkManager javadocs for more details (e.g. “The res-auth and res-sharing scopes are ignored in this version of the specification. The EJB or servlet can then use the WorkManager as it needs to.“).

    2) I’d like to use the @Resource annotation to inject the WorkManager into my EJB 3 session bean. What “name” do I use for the resource?

    I’d say something like this (not tested):

    @ResourceRef(jndiName="java:comp/env/wm/MyWorkManager",
    auth=ResourceRef.Auth.CONTAINER,
    type="commonj.work.WorkManager",
    name="MyWorkManager")
    

    3) How do I configure the number of threads and other parameters for the WorkManager.

    See the description of the <work-manager> element and Using Work Managers to Optimize Scheduled Work for detailed information on Work Managers

    My understanding is that the underlying implementation on WebLogic is CommonJ, but I’d prefer to use a non-proprietary approach if possible.

    I don’t have any other suggestion (and, as long as this implementation follows the standards, I wouldn’t mind using it).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using AdoNetAppender (SQL server) in my asp.net application and would like use
I would like to use a language that I am familiar with - Java,
I would like to use Emacs to edit some VB6 files but Emacs does
I would like use data annotations to handle validation in my Silverlight app. The
I would like post some message as another user (not currently using the app).
I currently have some large strings that I would like use as test data
Designing my RESTful API, I would like use following URI http://[HOST]/[PLANET]/[LAT];[LONG] e.g. http://myserver/earth/50.2;29.1 What
I would like to use something like CLR Profiles on .Net 2.0 to see
I would like to use as and is as members of an enumeration. I
I would like to use a component that exposes the datasource property, but instead

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.