You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Bonnie MacKellar <BM...@mobius.com> on 2003/10/02 21:54:28 UTC
rollback problem
Hi,
I have a simple two step transaction, in which two inserts occur. I am using
PB broker, with OJB transactions. I am connecting to a data source in
Weblogic. I am using rc4.
When a rollback occurs, the first record inserted in the transaction is not
removed. This is very incorrect, of course. I looked back in the archives
for this list, and found a message saying not to use
ConnectionFactoryManagedImpl if you are using OJB transactions. Fine. So I
switched to ConnectionFactoryPooledImpl. But the problem remains. Is there a
known problem with this?
My code is
try
{
broker.beginTransaction();
broker.store(customer);
broker.store(audit);
broker.commitTransaction();
}
catch (Exception e)
{
broker.abortTransaction();
logger.error(e.getMessage());
}
}
I am attaching my ojb.properties as well.
Thanks,
Bonnie MacKellar
Re: rollback problem
Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Bonnie,
is this problem solved by
setting
> useAutoCommit="1"
as you posted in an later mail?
regards,
Armin
On Thu, 2 Oct 2003 15:54:28 -0400, Bonnie MacKellar <BM...@mobius.com>
wrote:
>
> Hi,
>
> I have a simple two step transaction, in which two inserts occur. I am
> using
> PB broker, with OJB transactions. I am connecting to a data source in
> Weblogic. I am using rc4.
>
> When a rollback occurs, the first record inserted in the transaction is
> not
> removed. This is very incorrect, of course. I looked back in the archives
> for this list, and found a message saying not to use
> ConnectionFactoryManagedImpl if you are using OJB transactions. Fine. So
> I
> switched to ConnectionFactoryPooledImpl. But the problem remains. Is
> there a
> known problem with this?
>
> My code is
> try
> {
> broker.beginTransaction();
>
> broker.store(customer);
> broker.store(audit);
>
> broker.commitTransaction();
>
> }
> catch (Exception e)
> {
> broker.abortTransaction();
> logger.error(e.getMessage());
> }
> }
>
> I am attaching my ojb.properties as well.
>
> Thanks,
> Bonnie MacKellar
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org