• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS 2-way communication, doesnt make sense to make transactional in some cases?

 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

'2-way' means (synchronous, like calling a method, or remote procedure call).
I send a message to queue 1, and in few seconds (10 second limit), I must receive a reply to the message at queue 2 (sent by another service as reply to my message).

SEND.
Because the 'send' part must be committed (transaction), so that message will be sent and receiver can retrieve the message, then there is no need to put it in a transaction. Is this correct?

RECEIVE.
In the 'receive' part, if and only if my business requirement never needs me to put back a message into the queue (e.g. failed processing), then I do not need to put it in a transaction. Is this correct?

SUMMARY.
Because in my business requirement, the 'receive' does not need to put back the message in any scenario, then I dont need to put neither the 'send' nor the 'receive' in a transaction. Any comment, e.g. if this is bad?
 
Ranch Hand
Posts: 417
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I think there are 2PC/3PC (double/triple phase commit) transaction managers that could make the whole process transactional.

Otherwise, it is usually simpler to commit both messages individually and design handling of the use cases at the application level if feasible. But yes, still use independent transactions unless you can't see any downside in not using them..
 
Jesus Angeles
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I made them non-transactional.

 
My cellmate was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic