JIRA said post here before posting a bug. I have the following test case which is very simple....
Code:
EntityManagerFactory sf = Persistence.createEntityManagerFactory(
"xcoreNonJta", props);
//put a breakpoint here and
//pull the internet connection after hitting the breakpoint
//then continue the test!!! postgres passes, oracle fails!!
EntityManager mgr = sf.createEntityManager();
mgr.getTransaction().begin();
//since we do nothing, neither commit nor begin will interact
//with the database...isn't hibernate kick ass except when
//used with oracle :(
mgr.getTransaction().commit();
mgr.close();
sf.close();
This test case works GREAT against postgres and does not waste database connection resources by sending data across to the database BUT it fails against oracle. I just tested this on the latest 3.3.2 GA and previously was on 3.3.0.SP1.
Because of this bug, SEAM is not working at all when the oracle database is down or the internet connection to the database is down(ie. the db NIC breaks). It ends up in an infinite redirect.
There are two BUGs really. One is solved by turning autocommit=false in persistence.xml. If you do not do this, mgr.getTransaction().begin() results in a database hit and should NOT. (again, I don't need to set autocommit to false for postgres). Then, once that is set to false, mgr.getTransaction().commit() fails as it hits the database when it does not need to as well.
Is this a hibernate bug? I was just going to report it in JIRA, but it said to report here first.
Lastly, this also means that if using the transaction per http request pattern that seam and nearly everyone else use, oracle is getting a database hit on every single http request even for just plain static seam pages......this I would think is very very bad.thanks,
Dean