Results 1 to 6 of 6

Thread: declarative tx for unit of work

  1. #1

    Default declarative tx for unit of work

    As far as I can understand how declarative transaction works, I think it works best when the tx is nicely embedded within a method boundary.

    Imagine a case where there is an extraordinarily long session involving multiple http requests (user think time in between). This can be done programmatically using Filters. basically, first servlet starts a session. each intermediate servlet processing will be looking for a flag which indicates the end of the unit-of-work. last one closes the session.

    Is declarative transaction even applicable in this case?

  2. #2
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

  3. #3

    Default

    thanks for the references, but I don't think they address my point.

    it appears that osiv is intended to take care of lazy loading of collections, such as children in a tree.

    what I am talking about is unit-of-work transaction, where DML get processed at the end of a long running process, extending well over a single web request. My question is whether AOP can address such a need?

  4. #4
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

    Default

    Quote Originally Posted by bhomass View Post
    thanks for the references, but I don't think they address my point.
    They do, but probably from another side than you expected. All those threads are more or less about the limitations and caveats of OSIV - and end in "how it should be". What you want is also called Open Session In Conversation. Unfortunately, there is no built-in support available yet. Though it might already be possible by reading Dave's comments.

    Jörg

  5. #5

    Default

    funny I posted a reply, but it seems to have gotten lost.

    I am making the point that it appears to me that both osiv and osic seems to be programming patterns that do not use AOP, and are not declarative. if I am wrong, please point that out to me. Because I would be very interested if someone knows how that could be done.

  6. #6
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

    Default

    Quote Originally Posted by bhomass View Post
    I am making the point that it appears to me that both osiv and osic seems to be programming patterns that do not use AOP, and are not declarative.
    I'm not aware of an implementation of OSIC neither do I know how you can do it declaratively. It would probably need to be coupled with something like a flow description like Spring web flow. Dave Syer seems to have something in mind. I have not seen it though.

    Jörg

Posting Permissions

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