• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

OSB Forcing rollbacks for transaction

Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'am a newbie to OSB and have a question about (JMS + Http transport) approach.

I have a requirement to read a message from a JMS queue (XA) and route (sync) to a business service which is wrapper for a SOAP service.

Our architecture grp forbade us from using service callouts due to high loads and do not want to have any performance issues.

For all service server side exceptions related to 500, 404 what should be our approach to handling exceptions and transactions

considering reqd is not to lose any messages (Message should go back on JMS Queue during a exception like 404 or 500)

Since http transport cannot be part of XA we want to read the response code in the response pipeline and raise an error which will

rollback the transaction.

Scenario and its probable solution unfolds below

•request pipeline of JMS queue consumer starts transaction.

•This transaction is suspended (Best effort does not matter with exactly once since http is xa non compliant)

when call is routed to service

•Service will have to execute without any transaction context.

•Service will fail with some exception like 404 or 500

•Control will pass to the response pipeline and I want the response pipeline to continue the suspended transaction of the request pipeline

So that can be achieved by having the checkbox (same transaction for response) enabled ?

In the response pipeline we want to read response code (if expression) and for 404 and 500 raise an error and force transaction to rollback.

Can anyone provide code samples for this and also validate if the above approach works ?

Is there a better error handling mechanism in our scenario ?
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic