Re: Serialized Access

From: "Phillip Mills" <pmills(at)systemcore(dot)ca>
To: "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Serialized Access
Date: 2008-06-26 12:34:26
Message-ID: dd0408e50806260534l68b9703ayfb364b9bcfd33662@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 25, 2008 at 10:21 PM, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
wrote:

>
> You might want to look into advisory locking. If your locks don't need
> to be longer than the life of an active EntityManager session then you
> can probably just issue a native query through the EntityManager to
> acquire the lock before doing anything more.

Thank you very much for this and the link. (I'm much more an OOP programmer
than a DB programmer.) Too bad about the non-portability, but I suppose it
had to be.

I am a little bemused that the only supported Java persistence strategy is
to try the operation, and then react to failure by recreating the entire
transaction. At first I assumed I could catch the exception and then re-do
the one table operation that had failed...nope, not in a transaction any
more.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2008-06-26 12:36:08 Re: Unicode problem again
Previous Message Phillip Mills 2008-06-26 12:20:04 Re: Serialized Access