bug « Transaction « JPA Q&A





1. begin transaction fails when db is down? bug???    forum.hibernate.org

Most web frameworks(like seam, etc) use a transaction pattern of beginning a transaction(calling tx.begin) and committing the transaction(tx.commit) on every http request. This saves us alot of time. In the case of using the postgres jdbc driver, if the database is down, i can begin a transaction, commit it without doing any sql and everything works GREAT for those static pages ...

2. Bug with PostUpdateEventListener:wrong Transaction ob return    forum.hibernate.org

Hi guys, thank you for your help in advance. I've discovered something that I hope is due to my own ignorance somehow and not due to a bug in Hibernate (which is a great product, btw). Anycase, Im having a system where Im retaining the DAO objects as business objects for a while and I need a system to rollback changes ...

3. session.lock(obj, LockMode.NONE) bug?    forum.hibernate.org

not sure if this is by design or if it is a bug, but i'm 90% sure that this is what is going on. i have two transient objects in memory: A and B, each of which has a one-to-many relationship with a lazy loading collection C (which has been initialized on both instances). the same instance of the class in ...

4. Is this a LockMode bug or a feature?    forum.hibernate.org

Beginner Joined: Wed Jul 21, 2004 12:28 pm Posts: 27 Location: New York Below is the test case that demonstrates odd behavior. Parent and Child are nothing special just regular parent (one-to-many) child relation and both are versioned. Both 2.1.4 and 2.1.3 exhibit the same behavior. Code: public void testLockModeBug () throws Exception { ...

5. Hibernate Transaction bug?    forum.hibernate.org

Hello.. I'm currently using Hibernate 2.1.18, with MySQL 4.1.10a this is a snapshot of my code: ------------------------------------------------------------ CODE 1 (this works, but require like 1000 transactions) Code: for (int j=0;j

6. 3.0.2 auto_close rollback regression bug ?    forum.hibernate.org

Hibernate version: 3.0.2 I noticed that in 3.0.1 this bug was fixed "* fixed session not getting closed with auto_close when rollback occured" taken from the 3.0.1 release notes. Well I am seeing a regression in 3.0.2 of the above bug. I couldn't find the bug in JIRA (Steve had one similar one closed that was in 3.0.2). Prior to submitting ...

7. Bug? Problems using lock for update with MSSQL 2000    forum.hibernate.org

Hi, when loading an Object with lock mode UPGRADE, the database does not lock the row. When searching for the problem, we detected that the generated SQL Query contains the wrong from clause: instead of from campaign it should be from campaign with (updlock, rowlock). We assume that the method Select.toStatementString is wrong: instead of buf.append("select ").append(selectClause) .append(" from ").append(fromClause); it ...

8. Insert bug if a rollback occurs    forum.hibernate.org

Hello, there seems to be an insert bug (em.persist) in the current Hibernate version. The entity's primary key is a Long value, auto generated. Entity: Code: @Entity @Table(uniqueConstraints = @UniqueConstraint(colmnNames = {name})) public class MyClass { private Long id; private String name; @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { ...

9. subselect fetch ignored after commit but before close (bug?)    forum.hibernate.org

Hi all, Java persistence with Hibernate states that "a subselect is only remembered by hibernate for a particular Session". Despite this I noticed that after session.getTransaction().commit() the subselect fetch is disabled, even if the session is not yet closed. For example: 1) This works parents = .... parents.get(0).getChildren().get(0) <-- children for all parents are fetched session.getTransaction().commit() session.close() 2) This doesn't work ...





10. Persisting multiple mapped class in one transaction (bug?)    forum.hibernate.org

Hi all, I've mapped a class to multiple tables, similar to the example from the hibernate documentation (http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping-entityname.html). However when an object is persisted to each mapping-entity in one transaction (in the example, to both the CurrentContract and HistoricalContract table), the first persist is successful, but the second is not. Probably because the object is already in the session for the ...

12. Query failed: lock...could not be acquired after 2 ms [bug?]    forum.hibernate.org

Hi I have application, where 2 threads are trying execute the same cached query. Second query fails with message org.springframework.orm.hibernate3.HibernateSystemException: org.jboss.cache.lock.UpgradeException: upgrade lock for (...) could not be acquired after 2 ms. Lock map ownership Read lock owners: [] Write lock owner: GlobalTransaction:<10.82.33.235:7900>:37 (caller=GlobalTransaction:<10.82.33.235:7900>:38, lock info: write owner=GlobalTransaction:<10.82.33.235:7900>:37 (org.jboss.cache.lock.LockStrategyReadCommitted@1cd9f1aa)); nested exception is org.hibernate.cache.CacheException: org.jboss.cache.lock.UpgradeException: upgrade lock for (..) could not be ...