I currently override the DirectService, wrapping the trigger-part in a db-transaction. Main reason was to be able to catch hibernate.StaleObjectException and show a graceful error msg (optimistic lock violated, bla), lazy loading thus runs in a secon ta for renderResponse.
Not sure whether that's really the best way however... I also had a Listener-Filter, but wrapping each listener-call (possibly many per request) in a db-ta felt dead-wrong (at least for my app). Marcus > -----Original Message----- > From: Joel Trunick [mailto:[EMAIL PROTECTED] > Sent: Monday, January 23, 2006 4:16 PM > To: Tapestry users > Subject: RE: IMonitor and T4/4.1 > > > > I'll have to find some examples, it's not clear at this point how I > would obtain any service exception and rollback/commit based on its > existence using the pipeline (see message below). > > J > > -----Original Message----- > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] > Sent: Friday, January 20, 2006 6:01 PM > To: Tapestry users > Subject: Re: IMonitor and T4/4.1 > > Contribute a filter into > > http://jakarta.apache.org/tapestry/tapestry/hivedocs/config/ta > pestry.req > uest.WebRequestServicerPipeline.html > > will be a good way to be notified of the start and end of any request. > Good place to manage Hibernate sessions and transactions, for > example. > > On 1/20/06, Joel Trunick <[EMAIL PROTECTED]> wrote: > > I found an answer that works for me (in 4.0): > > > > <implementation > > service-id="tapestry.monitor.DefaultMonitorFactory"> > > <invoke-factory> > > <construct > class="...web.tapestry.MyMonitorFactory" /> > > </invoke-factory> > > </implementation> > > > > > > However, still curious what my other option is when 4.1 > comes out, as > > IMonitor is supposed to go away. Anybody? > > > > Joel > > > > -----Original Message----- > > From: Joel Trunick > > Sent: Thursday, December 29, 2005 6:46 PM > > To: Tapestry users > > Subject: IMonitor and T4 > > > > What's happening with IMonitor? > > > > I have the following code where do I place it in Tapestry 4.0? > > > > MyMonitor: > > public void serviceException(Throwable arg0) { > > this.t = arg0; > > } > > > > public void pageRenderBegin(String arg0) { > > if (t == null) { > > DataContext.getThreadDataContext().commitChanges(); > > } else { > > DataContext.getThreadDataContext().rollbackChanges(); > > > > } > > } > > > > I saw an earlier thread but no answer... > > > > Joel > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > Howard M. Lewis Ship > Independent J2EE / Open-Source Java Consultant > Creator, Jakarta Tapestry > Creator, Jakarta HiveMind > > Professional Tapestry training, mentoring, support > and project work. http://howardlewisship.com > > --------------------------------------------------------------------- > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
