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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:51:15+00:00 2026-06-13T02:51:15+00:00

Advice needed for JMS Queuing Scenario Hi, I’m new to Java EE and Application

  • 0

Advice needed for JMS Queuing Scenario

Hi, I’m new to Java EE and Application Servers and I would like to know if a JMS Queue (or ActiveMQ?) solution is the right thing for my scenario. Right now I think not, but there seems to be a lot of options that I might not be aware.

I have client application what can access a Project (data on a database) and will lock that project until the client is finished. The client might have a lock on a project for many days if he doesn’t close the application.

I need to develop a webservice that will post to a queue operation(s) to be done on a project. The hard part is that these operations need to be put on hold if this project is currently locked. (And I won’t know when that lock is released; so I will need to have maybe a timer that will try to dequeue those operations).

So if the Project A is currently locked, my queue
might looks like this :

  1. Add Data XXX to Project A
  2. Add Data ZZZ to Project B
  3. Update Data XXX of Project A
  4. Update Data ZZZ of Project B
  5. Remove Data ZZZ of Project B

If A is locked, i need to be able to continue to process operations on B (or any other unlocked project), and have the processing of project A later, when its lock is released.

I thought about creating in memory JMS queues for each Project that have pending operations to preserve their order) but I can’t (and should not) since Queues are to be defined by the App Server. And I obviously need persistent queues (so no temporary queues ?)

Are JMS queues the right thing for this scenario ?
Could ActiveMQ or another implementation help ?

Will I have to code by own Queue/SQL Table/EJB on Timer ?

  • 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-13T02:51:16+00:00Added an answer on June 13, 2026 at 2:51 am

    There are a lot of options, both for JMS and other approaches.

    But here are my thoughts of one possible solution with JMS (ActiveMQ or whatnot):

    you could have a JMS queue for incomming messages and one queue for messages on hold (waiting to be processed on some locked project). Hopefully, you also have some ID (I call it “projectId”, to identify a locked project). I also assume you can execute code when a project is released.

    Here is some psudecode how you could think, while implementing this scenario with queues.

    public void onMessage(Message msg){
       ProjData pd = extractProjectData(msg);
       if( projectLocked(pd) ) {
         msg.setStringProperty("projectId",pd.getProjectId());
         sendToOnHoldQueue(pd);
       }else{
        processProjectData(pd);
       }
    }
    
    // Say there is an event somewhere when the lock is released
    public void onProjectLockReleased(projectId){
       // select messages waiting for this project via Jms selectors..
    
       // you may or may not want to lock the project here, while working of the "on hold events"
       MessageConsumer consumer = session.createConsumer(onHoldQueue,"projectId='"+projectId+"'");
       while(Messages msg  = consumer.receiveNoWait()){
         processProjectData(pd); 
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to get some advice on structuring my javascript code and jquery
Advice needed for backend form submission to aweber and get response. Scenario When customer
I am relatively new to regex expressions and needed some advice. The goal is
I wrote an implementation for a priority queue I needed, and now I would
Would like some advice from this. I got a table where I want to
Ok, so I would like some advice on how to set up a model.
What advice/suggestions/guidance would you provide for designing a class that has upwards of 100
Looking for best advice on how to do this: I have an insert like
I'm relatively new to Git, and want to get advice on best practices for
Does anyone have any advice for migrating a PowerBuilder 10 business application to .NET?

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.