[hibernate-commits] [hibernate/hibernate-orm] eb66fe: HHH-7251 PostgreSQL dialects now convert proper Hi...

GitHub noreply at github.com
Wed May 2 18:35:10 EDT 2012


  Branch: refs/heads/master
  Home:   https://github.com/hibernate/hibernate-orm
  Commit: eb66fed9769cf7c70b0ab4eb7478543f53c43fd1
      https://github.com/hibernate/hibernate-orm/commit/eb66fed9769cf7c70b0ab4eb7478543f53c43fd1
  Author: Bryan Varner <bryan at varnernet.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    M hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQL81Dialect.java

  Log Message:
  -----------
  HHH-7251 PostgreSQL dialects now convert proper HibernateExceptions for Deadlock / lock timeout (not available with NOWAIT query).


  Commit: 089a36a260ab0be0805c0d1f1b5500f7e1460755
      https://github.com/hibernate/hibernate-orm/commit/089a36a260ab0be0805c0d1f1b5500f7e1460755
  Author: Bryan Varner <bryan at varnernet.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    M hibernate-entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java

  Log Message:
  -----------
  HHH-7252

The code was a bit non-obvious (assignment in a method call argument) where it was being done, and the local variable (lockOptions) assignment was missing in the find() method implementation.
I changed all instances of lockOptions assignment to assign before the method call where it's required as an argument, ensuring proper scope for exception mapping.


  Commit: d28cb4c39f7d4b17043dbd6ac07f91bdb3eefaa5
      https://github.com/hibernate/hibernate-orm/commit/d28cb4c39f7d4b17043dbd6ac07f91bdb3eefaa5
  Author: Bryan Varner <bryan at varnernet.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    A hibernate-core/src/test/java/org/hibernate/dialect/PostgreSQL81DialectTestCase.java

  Log Message:
  -----------
  Added a test case for HHH-7251


  Commit: 327002ab02a72eb4fe5de175b79232273ebb2af1
      https://github.com/hibernate/hibernate-orm/commit/327002ab02a72eb4fe5de175b79232273ebb2af1
  Author: Bryan Varner <bryan at varnernet.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    M hibernate-entitymanager/src/matrix/java/org/hibernate/ejb/test/lock/LockTest.java
    M hibernate-testing/src/main/java/org/hibernate/testing/DialectChecks.java

  Log Message:
  -----------
  Adding a test case for HHH-7252. In this branch, the test case currently fails for PostgreSQL matrix tests, unless HHH-7251 is also applied.


  Commit: c1849d56f64e6c835a7ee901934be52fadef92d8
      https://github.com/hibernate/hibernate-orm/commit/c1849d56f64e6c835a7ee901934be52fadef92d8
  Author: Bryan Varner <bryan at varnernet.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    M hibernate-entitymanager/src/matrix/java/org/hibernate/ejb/test/lock/LockTest.java

  Log Message:
  -----------
  Changing the test case to no longer fail when PersistenceException is thrown. This feels sooo wrong.

I know dialects aren't mapping lock exceptions properly, and this test case exposes that if you fail the test when PersistenceException is thrown. So what do I do now?

There are other tests in this very test class that don't fail the build when the wrong exception is thrown, even though they clearly should.


  Commit: cb1c4857748b0a7cae18610f17d0367b84475090
      https://github.com/hibernate/hibernate-orm/commit/cb1c4857748b0a7cae18610f17d0367b84475090
  Author: Bryan Varner <bryan at varnernet.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    M hibernate-core/src/main/java/org/hibernate/dialect/H2Dialect.java
    M hibernate-entitymanager/src/matrix/java/org/hibernate/ejb/test/lock/LockTest.java

  Log Message:
  -----------
  Yes, much cleaner...


  Commit: 5c0d4490827bff0cc59cc249d157a04d996e5b36
      https://github.com/hibernate/hibernate-orm/commit/5c0d4490827bff0cc59cc249d157a04d996e5b36
  Author: Bryan Varner <bryan at varnernet.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    M hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQL81Dialect.java
    M hibernate-entitymanager/src/matrix/java/org/hibernate/ejb/test/lock/LockTest.java

  Log Message:
  -----------
  Cleaned up the dialect error conversion a little bit for PostgresSQL. I was doing more than I needed to.

Updated the LockTest to enable another nowait test for postgresql.


  Commit: 8b40d71c84c072c134e2111729a4e36283867b3a
      https://github.com/hibernate/hibernate-orm/commit/8b40d71c84c072c134e2111729a4e36283867b3a
  Author: Bryan Varner <bryan at varnernet.com>
  Date:   2012-05-02 (Wed, 02 May 2012)

  Changed paths:
    M hibernate-entitymanager/src/matrix/java/org/hibernate/ejb/test/lock/LockTest.java

  Log Message:
  -----------
  Renamed the test case to be more consistent.


Compare: https://github.com/hibernate/hibernate-orm/compare/0bca4ab...8b40d71


More information about the hibernate-commits mailing list