Announcement Announcement Module
Collapse
No announcement yet.
Spring with aop transaction in an SOA stack Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring with aop transaction in an SOA stack

    We currently have spring based service layer (service facade,service, doa and web channel(struts based) wired through spring). We would be implementing soa stack by extending it with esb (enterprise service bus).
    for the services facades (which orchestrates services), i injected transaction through aop mechanism. Our service layer returns a single Service Response packet which can be sent over the wire (the exception are ultimately caught and converted to equivalent message and stored in this packet).
    The problem is if we aop transaction on service facade, we need to throw exception and if we throw exception we cannot send a response packet. This poses a problem as the service layer is indepedent and can interface over the wire to send packets.
    However we also want to leverage on the declarative aspects of aop based transaction.

    What is the solution that is possible with spring provides in such cases?

  • #2
    What about setting an interceptor before the transaction-interceptor? There you might catch an exception after the transaction has been closed and process it appropriately (e.g. by sending an according message).

    Another (I think not so elegant) solution would be to avoid exceptions and mark the transaction as rollbackOnly programmatically.

    Regards,
    Andreas

    Comment

    Working...
    X