From: Dominik B. <dba...@sa...> - 2001-09-28 20:52:19
|
thanks for the replies, guys. In fact I threw a RemoteException instead, it caused a rollback. Everything works great. In fact it works so well that I'm wondering why even use entities in the first place =) I guess they might be useful if numerous apps are accessing the db. -dom -----Original Message----- From: jbo...@li... [mailto:jbo...@li...]On Behalf Of danch Sent: Friday, September 28, 2001 12:37 PM To: jbo...@li... Subject: Re: [JBoss-user] castor and transactions 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 >> >> _______________________________________________ JBoss-user mailing list JBo...@li... https://lists.sourceforge.net/lists/listinfo/jboss-user |