Home > Archive > PostgreSQL JDBC > July 2005 > Re: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored unti









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored unti
Senthoorkumaran Punniamoorthy

2005-07-19, 8:24 pm

Thanks for responding. However the problem with using this approach
would be since we are using container managed transaction and
persistance (CMP) the application doesnt have control over how the
SQLs are issued and executed. All managed by Jboss. In situations like
this what could be a viable alternative?

Regards,
Senthoor

On 7/19/05, im i <linimi@gmail.com> wrote:
> Hi,
>
> (Sorry my english.)
>
> I think, the problem is not in query. There is other statement what
> corrupt the transaction before query, example insert or update. The
> postgres 8. solve the problem with savepoint, you can create savepoint
> before critical statement and when error occured you need rollback to
> savepoint:
>
> http://www.postgresql.org/docs/8.0/...-savepoint.html
>
> When you catch exception then the transaction is corrupt alredy.
>
> try {
> savepointName = this.getClass().getName() + "-" +
> this.getClass().hashCode();
> savePoint = conn. setSavepoint(savepoi
ntName);
> stmt.execute();
> } catch (SQLException sqle) {
> conn. rollback(savePoint);

> }
>
> linimi
>
> On 7/19/05, Senthoorkumaran Punniamoorthy <senthoor@gmail.com> wrote:
>


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com