From: danch <da...@nv...> - 2001-09-28 17:37:05
|
I think the real reason that behavior is in the spec is that if the application is throwing an application defined exception, really only the application _can_ know whether or not to roll back. Not that I wasn't surprised by the behavior... -danch Dmitri Colebatch wrote: > throwing an applcation exception doesn't automatically rollback the > tx. you'll need to call setRollbackOnly on the bean context for that to > happen - do it before you throw the exception as a general rule. I've > been told that this behaviour is in the spec to make it compliant with > CORBA... someone might want to elaborate on the reasoning behind it > though. > > cheers > dim > > On Thu, 27 Sep 2001, Dominik Baranowski wrote: > > >>hello, >> >> I'm trying to integrate castor into jboss. Everything seems to be running >>fine. I'm wondering how I can get a data object managed by castor to be >>included in a trasaction started by the container. (container managed >>transactions) >> >>that is, >> >>I have a transacted session bean which asks Castor for an object. I change >>the object and then I call update on the database object I got from castor, >>before I exit the session bean method (and therefore commit)I throw an >>exception from the session bean which should cause a rollback and no changes >>commited to the database. >> >>is there a way to do this? >> >>the bahavior that I'm seeing is that the change goes into the db >> >> >>thanks >>-dom >> >> |