[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4839) database being down, the transaction patterns fail

Dean Hiller (JIRA) noreply at atlassian.com
Mon Jan 25 11:50:29 EST 2010


database being down, the transaction patterns fail
--------------------------------------------------

                 Key: HHH-4839
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4839
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.3.2
         Environment: jboss5.1, seam2.2.0
            Reporter: Dean Hiller
            Priority: Critical


Many frameworks and hibernate even suggests to use the pattern that on every http request, start a transaction and at the end commit it even if no sql is going to be run.  This works great if using the postgres jdbc driver in which the driver never talks to the db unless sql is done, BUT the postgres XA driver, oracle JDBC driver and oracle XA driver all fail this same test.....

1. create a static page that requires no sql to be run(no selects, updates nor inserts)
2. in seam go to the static page
3. transaction failure using one of the last 3 drivers above(again, postgres driver works fine).

In seam, it is even worse, users ended up in an infinite redirect when our database went down which then caused jboss to go down from all the traffic of infinite requests from all our users(IE only...firefox kicks users out of the infinite redirect).  This pattern is great as long as hibernate puts a proxy adapter or something in front of all the datasources and jdbc drivers which will only open a connection if sql is actually going to be run(lazy open connection!!!!).  

With the oracle driver, the call to commit results in talking to db even though no sql was run.

With postgres XA datasource and oracle XA datasource, they both try to open a connection when the transaction starts instead of lazily opening the connection when the first sql is run instead.

I tried the user forums here...
https://forum.hibernate.org/viewtopic.php?f=1&t=1002203

but got no responses.  I filed a seam bug that I will tie to this bug to be tracked as well as I am not sure where this would get fixed.  There is stack traces in the seam bug...
https://jira.jboss.org/jira/browse/JBSEAM-4528

thanks,
Dean

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list