You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Sam Su <su...@gmail.com> on 2007/02/01 05:25:17 UTC

Re: How to add two dataobjects in one transaction?

Hi kevin, thanks for you response.

I debuged the application in Eclipse, I was sure that after user1  was
inserted into database without an exception, a commit was performed on the
connection.

as two data objects needed to be inserted into database in my program,  from
the DAS source code,  DAS will produce two different InsertCommandImpl
instances for these two changes.The 'success' flag is in two different
command instance, furthermore, it's a method scope variable, it can not be
shared between two command instances. When command instance for user1
execute without an exception, it will proceed to perform a commit on the
connection,  command instance for user2 execute will throw an exception, so
rollback. However the use1 has been already commited to database although
use2 fail to be inserted into database.

Re: How to add two dataobjects in one transaction?

Posted by Kevin Williams <ke...@qwest.net>.
Hi Sam,
You are right!
I'll open a JIRA for this.
Thanks.
--
Kevin

Sam Su wrote:

> Hi kevin, thanks for you response.
>
> I debuged the application in Eclipse, I was sure that after user1  was
> inserted into database without an exception, a commit was performed on 
> the
> connection.
>
> as two data objects needed to be inserted into database in my 
> program,  from
> the DAS source code,  DAS will produce two different InsertCommandImpl
> instances for these two changes.The 'success' flag is in two different
> command instance, furthermore, it's a method scope variable, it can 
> not be
> shared between two command instances. When command instance for user1
> execute without an exception, it will proceed to perform a commit on the
> connection,  command instance for user2 execute will throw an 
> exception, so
> rollback. However the use1 has been already commited to database although
> use2 fail to be inserted into database.
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org