Announcement Announcement Module
Collapse
No announcement yet.
declarative tx for unit of work Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    See the recent thread Why OpenSessionInViewFilter is misleading and useless in most cases and linked resources.

    Jörg

    Comment


    • #3
      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?

      Comment


      • #4
        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

        Comment


        • #5
          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.

          Comment


          • #6
            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

            Comment

            Working...
            X