If someone has a small and easy to understand example application with Hibernate, Spring, Tapestry and maybe Acegi, I would like to include it in EWAD (ewad.sourcforge.net). Hurry please because I want to release soon! Regards, Lennart >-----Original Message----- >From: "Tapestry users" <tapestry-user@jakarta.apache.org> >Sent: 01/11/06 - 11:14 >To: "Tapestry users" <tapestry-user@jakarta.apache.org> >Subject: RE: Re: Best Practice (Hibernate, Spring, Tapestry) > >There is not much need to be Tapestry specific IMO. > This article describes good approach to Hibernate + Spring >integration > >http://www.onjava.com/pub/a/onjava/2005/05/18/swingxactions.html?page=1 > > Simpler solutions are possible too: > >http://sandbox.sourcelabs.com/kosta/hb-beyond-hw/java/com/sourcelabs/hibernate/bhw/haop/doc/haop.html > > > >Cosmin Bucur <[EMAIL PROTECTED]> wrote: It just blows my mind , >that Spring or Tapestry or Hivemind do not >offer anything standard that can do this . > >Is such a common need , and it's such a common question , with so >much >general confusion arround it . > >I've been trying to get this working for a while . I find that >most >documentation available is poor and confusing , mostly because it >never deals with the SPECIFIC combination : hibernate + spring + >tapestry . > >Cosmin > >On 1/11/06, Paul Cantrell wrote: >> The Hibernate folks are a lot more excited about long sessions and >> detached objects than I am. (It's hard not to get attached to >a fun >> feature once you've implemented it!) Personally, I think they >make >> the app harder to write: there's much more worrying about >stale data >> and scalability. For many apps, caching give the same kinds of >> performance benefits with fewer programmer headaches and hidden >> concurrency issues. >> >> The session-per-request model is probably the simplest and easiest >> default to start with. I like to begin there, keeping in mind the >> other options, thinking carefully about where transaction >boundaries >> need to be -- and then depart from session-per-request when >specific >> situations require something different. >> >> Cheers, >> >> Paul >> >> >> On Jan 11, 2006, at 1:20 AM, >> wrote: >> >> > I just went thru Hibernate In Action (edition 1), chapter 8.2 >> > (Implementing Application Transactions). This chapter talks >about >> > the two options we talked about, and a third option: Long >Session. >> > >> > It seems that "Hibernate in Action" recommends Long >session on a >> > web application over other two. The next preferred option is >> > "Detached Persistent Object Strategy" (same as >option 1 in my >> > original email). >> > >> > Will this new information change your opinions on these >options? >> > >> > Thanks .... >> > >> > Shovon >> > >> > ----- Original Message ---- >> > From: Patrick Casey > >> > To: Tapestry users >> > Sent: Tuesday, January 10, 2006 6:40:29 PM >> > Subject: RE: Best Practice (Hibernate, Spring, Tapestry) >> > >> > >> > I'd generally be inclined to go with Option #2. Loading >an object in >> > session A, then reattaching it to session B (with, for >example, >> > Session.lock()) is a bit of a code smell with hibernate, >especially if >> > there's any chance the object might have been changed by >another >> > thread >> > between initial load and reattachment. >> > >> > Likewise there's the issue that if you're >storing the whole >> > thing in >> > the HTTPSession that burns memory *and* requires that all >your POJO's >> > implement serializable. >> > >> > All in all, I'd go with key and reload; it's >what I do about >> > 95% of >> > the time except for a few special cases where I need to keep >the >> > object and >> > session between screen renders, in which case I just store >store the >> > Hibernate session in the HTTPSession (which I wouldn't >recommend as a >> > general case solution). >> > >> > --- Pat >> > [EMAIL PROTECTED] >> > >> > >--------------------------------------------------------------------- >> > To unsubscribe, e-mail: >[EMAIL PROTECTED] >> > For additional commands, e-mail: >[EMAIL PROTECTED] >> > >> > >> >> _________________________________________________________________ >> Piano music podcast: http://inthehands.com >> Other interesting stuff: http://innig.net >> >> >> >> >--------------------------------------------------------------------- >> To unsubscribe, e-mail: >[EMAIL PROTECTED] >> For additional commands, e-mail: >[EMAIL PROTECTED] >> >> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > >Konstantin Ignatyev > > > > >PS: If this is a typical day on planet earth, humans will add fifteen >million tons of carbon to the atmosphere, destroy 115 square miles of >tropical rainforest, create seventy-two miles of desert, eliminate >between forty to one hundred species, erode seventy-one million tons of >topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their >population by 263,000 > >Bowers, C.A. The Culture of Denial: Why the Environmental Movement >Needs a Strategy for Reforming Universities and Public Schools. New >York: State University of New York Press, 1997: (4) (5) (p.206) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]