Re: use of savepoint in containter managed transaction

From: Radosław Smogura <rsmogura(at)softperience(dot)eu>
To: Amar Dhole <adhole(at)tibco(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: use of savepoint in containter managed transaction
Date: 2011-09-23 11:54:12
Message-ID: 8469d513dfc612cf33aec0c5253f57fe@mail.softperience.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, 23 Sep 2011 06:31:13 +0000, Amar Dhole wrote:
> HI All,
>
> I have requirement to use save point. But I am using session bean
> whose transaction is managed by container. While executing sql insert
> I got unique key constraint because of this my other command
> following
> this exception got ignored. I want to continue my transaction even
> after this as we ignore this insert and make an entry in other table
> for this error. And proceed head. with Postgres this is not possible.
> I cant user plsql block as behaviour is spread in all my application.
> Need some suggestion to achieve this with savepoint.
>
> I have some question.
> 1) Can I use savepoint in Container Managed transaction ?
Yes, You can, but I don't know result of this. ;) One day I worked on
couple of patches, maybe I have those somewhere to acquire this what I
assume You want.

> 2) Can I make some custom change to jdbc driver to ignore duplicate
> key exception or to raise warning instead ERROR.
I assume, You want your transaction to proceed when error will occur.
Yes you can make some change to ignore this, but this will not give you
expected behaviour, because error is generated on server side, and
server will rollback transaction.

But please specify more details mainly what You want achieve and what
are preconditions.
> Thanks
> Amar

Regards,
Radosław Smogura
http://softperience.eu

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Andrew Hastie 2011-09-23 12:38:48 Re: use of savepoint in containter managed transaction
Previous Message Amar Dhole 2011-09-23 06:31:13 use of savepoint in containter managed transaction