You'll get full advantage of Windsor Integration + Transactions at controller level if you handle your error messages using rescues.
You can look at the chained exceptions extension, too. -- Fábio David Batista [EMAIL PROTECTED] http://nerd-o-matic.blogspot.com On 7/7/06, Dru Sellers <[EMAIL PROTECTED]> wrote: > Cool, > > but how can i handle errors? Right now when i catch an exception i > tr.Rollback() and then display an error msg to the user on another page as > well as log the error. but if i let ATM do it how do i capture the exception > and show it to the user and log it. > > > sample controller method > > public void UpdateTelecom(string telephone, string fax, string website) > { > using(ISession session = > this._sessionManager.OpenSession()) > using(ITransaction tr = session.BeginTransaction()) > { > Organization o = this.GetOrganization; > try > { > > o.Telephone = telephone; > o.Fax = fax; > o.Website = website; > > tr.Commit(); > this.PropertyBag.Add("organization", o); > HandleSuccess("Address Update Successful"); > > } > catch (Exception ex) > { > tr.Rollback(); > HandleError("Address Update Failed", ex); > } > > this.RenderView(@"\account\telecomView"); > } > } > > On 7/7/06, Craig Neuwirt <[EMAIL PROTECTED]> wrote: > > > > If your controllers are using Winsor Integration, I would think you would > just add Automatic Transaction Mgmt facility and decorate your controller > class and methods with the transaction attribs. I am using the > ActiveRecordFacility to obtain sessions and calling a business service which > uses the .Net 2.0 TransactionScope to define the transaction boundaries. > > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ CastleProject-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/castleproject-users
