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

  • Home
  • SEARCH
  • 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 3803532
In Process

The Archive Base Latest Questions

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

In my application based on EJB3.0 and JBoss5 I need to implement functionality which

  • 0

In my application based on EJB3.0 and JBoss5 I need to implement functionality which allows multiple instructions to be processed simultaneously. E.g. there is a stateful listening EJB, which in case of receiving data (asynchronously) triggers pooled stateless beans to do computations. Running execution in one SLSB do not stops starting execution in another SLSB (in case of receiving request by SFSB before first SLSB finish its work). It’s all similar to Spring ThreadPoolTaskExecutor – task is passed into the queue and when there is a thread available to handle it, it gets it from the queue (everything is done parallel).

Unfortunately I cannot use Spring or other version of EJB spec (but I can use some JBoss-specific features). How can I implement such a thing? I thought about using MDB’s which acts as a task executors, but I am not very sure if it would be done simultaneously (that’s my first question ;)) and if it’s a right way of use JMS (not for “messaging” strictly).

Thanks in advance for all hints.

Piotr

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

    Use org.jboss.ejb3.common.proxy.plugins.async.AsyncUtils. This executes code on any SLSB (or even other beans that have an interface) asynchronous.

    An example:

    @Stateless
    public class SomeBean implements SomeBeanLocal {
    
        public Future<Order> getByUserIDAsync(Long userID) {
            SomeBeanLocal asyncSomeBean = AsyncUtils.mixinAsync(this);
            asyncSomeBean.getByUserID(userID);
            return (Future<Order>) AsyncUtils.getFutureResult(asyncSomeBean);
        }
    
        // normal non-async methods or other async methods here ...
    }
    

    This will dispatch the call to the managed thread pool that every EJB container has and return immediately. The code will then run in the background.

    JMS and Message driven beans have indeed been used for this in the past, but it’s not the best tool for the JOB. You run into a bunch of transactional problems like messages not being send until the transaction commits etc. It’s also harder to return a value. EJB3 timers were also used for this, as they too execute code asynchronously.

    I know you mentioned you can’t switch to another EJB version at the moment, but I would like to mention anyway that in EJB 3.1 one can use the @Asynchronous annotation. That really is the best way of tackling this problem.

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

Sidebar

Related Questions

I need to change the functionality of an application based on the executable name.
In my application based on EJB3.0 and JBoss5 I use async proxy from JBoss
A client of mine is looking to convert a critical 'application' based on multiple
When developing a new web based application which version of html should you aim
In application based on HornetQ engine I intend to create multiple Producers and Consumers.
Consider a normal customer-orders application based on MVC pattern using WinForms. The view part
I'm trying to design an application based on the OpenSocial API , and I'm
Microsoft's new Windows Live Application Based Storage API is a RESTful API. More info
I have created an iPhone application based on an OpenGL view. Now I would
Hi I am developing a simple application based upon ASP.NET MVC. I have altered

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.