Re: Cayenne and Spring (a Hibernate inspired question)

From: Malcolm Edgar (malcolm.edga..mail.com)
Date: Thu Feb 28 2008 - 04:59:55 EST

  • Next message: Marek Wawrzyczny: "Re: Cayenne and Spring (a Hibernate inspired question)"

    Another thing to consider is whether you want to serialize the object
    graph in the session. Another approach is to write it to the database,
    and have a status column in the parent object. When the final page
    "submit" is performed, the status column is flipped to invoke the
    business process.

    Using this design has some advantages in terms of scalability, and
    user can come back to complete an application even if the session has
    timed out, you can also see user abandonment of processes (i.e. where
    did they get up to). However with this pattern you need to have some
    form of sweeper process to clean up abandoned applications, i.e. use a
    Quartz job select all, pending status older than a configured period.

    regards Malcolm Edgar
    http://click.sourceforge.net

    On Thu, Feb 28, 2008 at 2:15 AM, Michael Gentry <blacknex..mail.com> wrote:
    > When I used Cayenne with a Tapestry application, I stored a
    > DataContext off in the session (so it was persistent across
    > request/response loops) and I could use it to handle objects I needed
    > to track from page-to-page (or even to the same page, but in a
    > different request/response loop). This is what you are talking about,
    > I think, with "long-running session." The only trickery I had to do
    > was tell Tapestry to stop serializing my Cayenne objects into the HTML
    > because on the next request/response loop, Tapestry would deserialize
    > those objects and you'd have a Cayenne object not attached to the
    > original DataContext. Once I told Tapestry to leave Cayenne alone, it
    > worked much better for me.
    >
    > Robert Ziegler showed how you can add sort orderings to your query.
    >
    > /dev/mrg
    >
    >
    >
    > On Tue, Feb 26, 2008 at 7:13 AM, Marek Wawrzyczny
    > <marek_wawrzyczn..nternode.on.net> wrote:
    > > Hi,
    > >
    > > It has been a while since I last used Cayenne and that was within a Swing ROP
    > > context.
    > >
    > > More recently I have been involved in writing a Spring MVC/Hibernate
    > > application. The experience has only made me fonder for Cayenne and now it
    > > appears that the team I'm in may consider ORM alternatives.
    > >
    > > My application is relatively simple CRUD application with the exception of one
    > > set of two screens, where all data entry culminates in a parent/child
    > > interface (using Spring's AbstractWizardFormController ).
    > >
    > > The object graph can become somewhat complex, combining objects from about 10
    > > different entities. The pages ideally would require a long-running session,
    > > or rather a ObjectContext spanning several requests.
    > >
    > > I'm curious as to how well does Cayenne handle these types of interfaces in
    > > web applications.
    > >
    > > The other problem we're currently having is sorting across multiple
    > > relationships.
    > >
    > > I'm curious as to other people's experiences in this area. I would love to be
    > > able to convince the team to move to Cayenne if the framework fits the bill.
    > >
    > >
    > > Kind regards,
    > >
    > > Marek Wawrzyczny
    > >
    >



    This archive was generated by hypermail 2.0.0 : Thu Feb 28 2008 - 05:00:28 EST