Win a copy of Java XML & JSON this week in the XML and Related Technologies 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Questions regarding using JMS vs REST  RSS feed

Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q1:I figured that REST and JMS are different things and used depending upon what's needed. With JMS  asuchronous messaging is possible since it follows FIFO (Queue/Topic based model). I was reading online somewhere that the asynchronous messaging is possible with REST as well. Based on what I understood, if
it depends upon client to decide whether the REST request it's planning to send should be synchronous or asynchronous. But if the client is using Javascript, javascript is single threaded, so I am wondering, how parallel (asynchronous) requests would be possible in this scenario?

Q2: I am planning to use Spring JMS for asynchronous requests as well as synchronous request. Basically, I have a stored procedure that's going to take hours and hence I am planning to send this request to JMS queue. If I understood JMS properly, how does the SQL query or call to a stored procedure will get executed in the MOM (let's say ApacheMQ), I mean how it's going to communicate with the Oracle database to execute the stored procedure/SQL query?
Saloon Keeper
Posts: 5219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think it's possible to start several REST requests in parallel from Javascript, at least not if that Javascript is part of a web page.

Furthermore, I don't think that JMS is well suited for synchronous processing. I'm fairly sure it didn't even support that way back when I looked into it, although that may have changed in later releases.
rubbery bacon. rubbery tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!