Search Postgresql Archives

Serialized Access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux