1. How do I ensure a value being updated with Hibernate hadn't been changed in the meantime since I read it? stackoverflow.comI have a problem where I want to read an object from the database using Hibernate, change a value, and save the object. If changing the value takes some time, what's ... |
2. Updating counters through Hibernate stackoverflow.comThis is an extremely common situation, so I'm expecting a good solution. Basically we need to update counters in our tables. As an example a web page visit:
So in ... |
3. Execute some arbitrary sql in the current transaction in JPA 2.0 stackoverflow.comI am new to JPA 2.0/EclipseLink/Glassfish/JEE6, and have kind of a basic question. I have a DAO in which most of the entities are mapped directly to columns using JPA annotations, so ... |
4. java.sql.SQLException: Unable to obtain lock in 60 seconds stackoverflow.comI'm tracking this error for a while now, it hapens on irregular basis unpredictibly and I haven't find a way to reproduce it for now. Our environment
|
5. XA rollback doesn't rollback (SQL/JDBC/Hibernate)Exception forum.hibernate.orgHello, Using Hibernate 2.1.1, I am having trouble rolling back a transaction, when an error occurs, such as: Code: Caused by: java.sql.SQLException: ERROR: Cannot insert a duplicate key into unique index ix_uus_user_subscriber The trouble is that even though my code catches HibernateException and calls xa.rollback(), Hibernate (Session, I guess) still 'remembers' the last SQL statement, the one which caused the ... |
6. Empty transaction without hibernate code produces sql delete forum.hibernate.org |
7. SQL locking on VIEW using UNION over two tables forum.hibernate.orgNewbie Joined: Mon Feb 07, 2005 10:07 pm Posts: 2 Hibernate version: 2.1.6 All I'm also posting this issue on the IBM developerworks db2 forum as I'm unsure where the problem lies : We're using Hibernate 2.1.6 in a J2EE app on Websphere 5.1 to access numerous DB2/400 files on our IBM iSeries running V5R2 using the JT400 v4.6 toolbox driver. ... |
8. SQL Exc : mfg_voidCarton was called outside of transaction forum.hibernate.org |
9. Multiple Transactions per Session, SQL not generated forum.hibernate.orgHi, I've developed a web based application which does NOT use the Transaction per request pattern nor JTA transactions. Instead my current session is obtained via plain JDBC. My current session and my currenct transaction are both bound to a ThreadLocal variables. My session is opened with a servlet filter and closed at the end of every request (I don't use ... |
10. Executing native SQL within the same transaction forum.hibernate.orgGood day, I have to execute session.save() and my stored procedure in the same transaction. My stored proc doesn't return resultset - it is used for update/insert. This sort of stored procs is not supported by Hibernate through native SQL queries. So, I use session.connection(). But apparently, my stored proc is NOT executed in the same transaction. Am I doing something ... |
11. Using Hibernate and SQL DAOs in the same transaction. forum.hibernate.orgHi, I'm developing an application that uses hibernate to make the CRUD operations and SQL DAOs to make some lookups and complex selects to the database. The hibernate uses one datasource and the DAOs uses another one. There some situations where I need to call one or more DAOs inside an Hibernate transaction, for exemple to validate a data against a ... |
12. commit; not seen in generate sql. forum.hibernate.org |
13. Is this possible? One SQL + two databases + one transaction forum.hibernate.org |
14. update() + named sql query in same transaction? forum.hibernate.orgtry { sessionFactory = com.tracker.db.SessionFactoryHelper.getSessionFactory(); currentSession = sessionFactory.openSession(); manager = new KeywordManager(currentSession); currentSession.beginTransaction(); //Perform updated currentSession.getTransaction().commit(); } catch (org.hibernate.StaleObjectStateException e) { currentSession.getTransaction().rollback(); //Synchronize object with newer version in database } catch (Exception e) { if (currentSession != null) { currentSession.getTransaction().rollback(); } } finally { if (currentSession != null) { currentSession.close(); } } |
15. SQL Deadlock or starvation problem forum.hibernate.orgHi all, I need your help. I have pretty hudge project based on hibernate, and my problem is, that after few hours/days sometimes only minutes all threads are waiting for connect to database, and server needs restart. I think problem is for sure in some deadlock in database, because after restarting of application server the problem persisted. I tried ti restart ... |