Serialized Access

Поиск
Список
Период
Сортировка
От Phillip Mills
Тема Serialized Access
Дата
Msg-id dd0408e50806250821h4ff11d4x607059249191bd1d@mail.gmail.com
обсуждение исходный текст
Ответы Re: Serialized Access  (Craig Ringer <craig@postnewspapers.com.au>)
Re: Serialized Access  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-general
I'm working on an application that uses EJB3 entities in JBoss, with Hibernate and a PostgreSQL database.  One of the entity tables needs consistent, synchronized updates to rows in an environment where telling the user that their operation failed and starting over is not an option.

Because it's the default, I've used EJB3's optimistic locking with a strategy of catching EJBExceptions and retrying my updates.  Since contention can be frequent, the overhead (and extra logic) for this seems like a waste.  I would like to try pessimistic locking and compare the results, but here's where my problem arises.  EJB documentation passes this off to the application server, which considers it a ORM problem.  Hibernate says it doesn't add any lock features beyond what JDBC and the database provide....

In the end, I need Java code in a stateless bean that causes serialized access to database rows that are under the control of an EntityManager, but the approach to doing that is eluding me.

So, I'm not entirely sure this is a PostgreSQL question, but if not perhaps someone can tell me which layer of this architecture *is* responsible.  :-)

Thanks in advance.

В списке pgsql-general по дате отправления:

Предыдущее
От: Rodrigo Gonzalez
Дата:
Сообщение: ERROR: could not open relation with OID 2836
Следующее
От: David Siebert
Дата:
Сообщение: Re: Probably been asked a hundred times before.