Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JMS Producer question

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy,

I have an app that among other things takes a list of objects and stores them in a db. Since this doesn't need to be done synchronously, I wrote it so that the list was iterated over and each item put into a JMS queue where it was consumed by another thread. It works fine, but the problem I have is that my producer seems to wait until each object is processed by the consumer. I was specifically using JMS in order to return to the app after sending off the objects. So my question is: Should my producer be running in it's own thread in order to have it perform the way I was expecting or am I possibly doing something else wrong.

I have avoided using code samples as I hope that this can be answered at a high level.

Regards,

Manny
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sending a message using JMS, is asynchronous. So, you should NOT be seeing the behaviour you have described.
 
Manny Garcia
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good to have that confirmation. I will dig deeper into this then.

Regards,

Manny
 
His brain is the size of a cherry pit! About the size of this ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic