Results 1 to 4 of 4

Thread: Spring integration + Hibernate session management

  1. #1
    Join Date
    Jun 2011
    Posts
    16

    Default Spring integration + Hibernate session management

    To manage contextual sessions in web we use OpenSessionInViewFilter.
    What is the proper way to set up same logic in an async messages in Spring Integration?

  2. #2
    Join Date
    Jun 2011
    Posts
    16

    Default

    I used channel interceptor for this purpose and it seems to work fine.
    Does postSend() method get executed after the whole chain finishes(as long as it stays in a same thread/transaction)?

  3. #3
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,146

    Default

    postSend() is called on each channel in turn as the thread returns so, yes, postSend is called on the firstChannel last, before returning to the inbound endpoint.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  4. #4
    Join Date
    Jun 2011
    Posts
    16

    Default

    Ok thanks Gary

Tags for this Thread

Posting Permissions

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