Results 1 to 2 of 2

Thread: Spring with aop transaction in an SOA stack

  1. #1
    Join Date
    May 2005
    Posts
    3

    Default 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. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    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

Similar Threads

  1. Unit testing with JOTM and JtaTransactionManager
    By lalle in forum Architecture
    Replies: 1
    Last Post: Oct 15th, 2005, 09:05 AM
  2. Replies: 0
    Last Post: Jun 6th, 2005, 06:22 AM
  3. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM
  4. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM
  5. Transaction pb Hibernate/MySQL
    By syluser in forum Data
    Replies: 2
    Last Post: Aug 28th, 2004, 02:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •