From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Vito *EXTERN*" <testforvln(at)163(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Confusing conflicts between OpenJPA and Postgresql |
Date: | 2014-03-24 15:00:39 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B17CE7D14@ntex2010i.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Vito wrote:
> I'm recently doing some research with Apache ODE engine. I use Postgresql as its external database,
> openjpa as its ORM solution and bitronix as its transaction manager. The ODE workflow engine starts
> without any problem. But when I deploy process definition files into the engine, the exception came
> out. I paste the error content at the end of this email.
> I looked through the source code of org.apache.openjpa.lib.jdbc.DecoratingDataSource, and found that
> openjpa is almost definitely to meant to invoke the function of reseting transaction isolation level,
> which would be catched by Postgresql and return with an exception.
> Does that mean openjpa works poorly with Postgresql? Or who can tell me how to solve this problem.
> The error content is below:
> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the
> middle of a transaction
> Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle
> of a transaction
That makes sense, doesn't it?
I don't think there is any database that would allow to change the isolation level
in the middle of a transaction.
I tested with Oracle:
SELECT ....
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
ERROR at line 1:
ORA-01453: SET TRANSACTION must be first statement of transaction
I think you will have to make sure that the SET TRANSACTION ISOLATION LEVEL
statement is the first statement issued in the transaction.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-03-24 15:16:31 | Re: Upgrading from 9.2 to 9.3 causes performance degradation |
Previous Message | Álvaro Nunes Lemos Melo | 2014-03-24 14:45:30 | Re: Upgrading from 9.2 to 9.3 causes performance degradation |