commit « Transaction « JPA Q&A





1. Hibernate - Two different transaction will commit succesfully    stackoverflow.com

I am using two different database. I am using two different session for delete records from both database.The code is below :

try{
  Session session1 = factory.getSession();
  Transaction trn1 ...

3. Two phase commit in hibernate?    coderanch.com

Thanks Arun for your reply, The material that you referred to says that we can achieve 2phase commit for BMT(Bean managed transaction )and CMT (container managed transaction ) ie both involving ejb. Can't we reap the benefits of 2phase commit without using ejb ie can we write distributed transaction by using normal hibernate session and transaction in an application server? Please ...

4. Handling JPA commit failures    coderanch.com

6. transaction is never committed    forum.hibernate.org

Hello. We are using Hibernate 3.3.1GA with Jboss 4.2.3GA. Here is the relevant hibernate configuration: java:toluna_mssql_jdbc com.toluna.common.hibernate.SqlServerDialect org.hibernate.transaction.JTATransactionFactory org.hibernate.transaction.JBossTransactionManagerLookup true true after_transaction true org.hibernate.cache.EhCacheProvider true true 1 250 thread true true ... Now my problem is that ...

7. High CPU usage on commit    forum.hibernate.org

We have a system that creates and persists a reasonably large number of objects on a daily basis (up to 50,000). When the objects are initially created, they are persisted with the following code: Code: EntityTransaction trans = mgr.getTransaction(); try { trans.begin(); mgr.merge(object); trans.commit(); } catch (Exception e) { ...

8. Transaction Commit probleme    forum.hibernate.org

9. two phase commit spanning multiple JVMs    forum.hibernate.org

Hello, I have a setup like this: 2 JVMs on 2 different servers. No J2EE container on either. I now need to do a two phase commit with a transaction spanning the JVMs on both servers. example: I start a transaction on server A. Here I insert something into the database. The, I pass the ID inserted to server B, which ...





10. Switching auto-commit off    forum.hibernate.org

I'm having a problem with what seems like a trivial configuration setting. I am currently using Hibernate as the persistence framework alongside Spring (using org.springframework.orm.hibernate3.support.HibernateDaoSupport). Initially auto-commit was adequate for my need however now my system has grown to require proper transaction management. I decided I wanted to simplify development and use annotation based transaction management to reduce the size of ...

11. couldn't turn off auto-commit    forum.hibernate.org

I'm using hibernate annotations, my database in is MySQL. I tried to persist a bunch of objects and commit at the end, which means insert all or insert none of them. For example, I want to insert 10 objects one time, if exception happens at the 9th object, because I didn't do commit, there should be no new data in database. ...

12. Transaction Committing    forum.hibernate.org

HI, My Current Application is using JBoss 4.0.5 Hibernate 3.0 Spring 2.5 Oracle 10g In the AS we are using both Hibernate and Normal SQL (both in CMT). Now i had a problem in committing. I need to commit only Hibernate transaction. 1) Is it Possible? 2) Other than nested transaction? Thanks in Advance Regards Baskar

13. Auto commit    forum.hibernate.org

Hello guys, I have below method which fetches data base on record Id, and if found set a new name to update the record. My problem is, when i set the new name, it doesn't show on the record. Meaning the update doesn't persist. Do anyone know what I am doing wrong? Code: @Transactional(propagation = Propagation.REQUIRED) private void ...

15. could not commit the transaction    forum.hibernate.org

this is my deletereg_code function . in that it cannot commit the transaction. Actually it works perfectly, but now it is not working. the code is: public void deleteRegistrationMasterEntry(String reg_code) { Session hibernateSession = HibernateUtil.currentSession(); Transaction transaction = HibernateUtil.beginTransaction(); transaction.begin(); String szQuery = "from " + DBConstants.REGISTRATION_MASTER_TABLE + " where " + DBConstants.REGISTRATION_CODE + "=?"; RegistrationMaster oRegistrationMaster = (RegistrationMaster) hibernateSession.createQuery(szQuery).setString(0, reg_code).uniqueResult(); ...

16. How can I commit more frequently (in hibernate.cfg.xml)?    forum.hibernate.org

Hi~ I tried to insert more than one million recoreds into one table in a transaction, however, it failed because the transaction log was full (database : DB2). I searched several forums and knew that : "Tranaction log full error pops up when the DML transactions are not commited frequently." Though allocating more log file (to enlarge LOGPRIMARY) may solve the ...





17. Can't commit transaction?    forum.hibernate.org

policy.setId(new PolicyId(ptd.getPolicynumber(),ptd.getRenewingnumber()); session = HibernateUtil.getSessionFactory().openSession(); tx = session.beginTransaction(); System.out.println("111111"); System.out.println("222222"); session.save(ptd); System.out.println("333333"); tx.commit(); System.out.println("444444"); session.flush(); session.close(); The problem is it prints 111111,222222,333333 but it doesn't print 444444. I am having problems while i am trying to commit the transaction. And if i don't use beginTransaction() and commit() then it doesn't save the value. I am using hibernate 2 and websphere application ...

18. Hibernate 3.5.6 causing 2phase commit problem    forum.hibernate.org

Hi Let me just give some high level scenario of my application. This is working application but started giving problem with new HB jars Im using WAS 6.1.0.29 with Oracle 10g and Hibernate 3.5.6 (upgraded in my application from old version) and ehcahce 2.3.2 I am facing an issue whenever Im trying to do some update I get above exception inside ...

19. difference b/w synchronized and committed    forum.hibernate.org

hi, i want to discuss two words used in hibernate which is synchronized and committed data. i think committed data into database means data will be permanently updated in database and when we reopen the session and trying to get data, we will get that data from database and code for committing is: Session session = sessionFactory.openSession(); Transaction transaction = session.beginTransaction(); ...

20. Hibernate Two transaction commit problem    forum.hibernate.org

I am using two different database. I am using two different session for delete records from both database.The code is below : try{ Session session1 = factory.getSession(); Transaction trn1 = session1.beginTrn(); session1.delete(foobar); trn1.commit(); Session session2 = jbomContext.getGrahpSession(); Transaction trn2 = session2.beginTrn(); session2.delete(box);`enter code here` trn2.commit(); }catch(Exception e){ trn1.rollback(); trn2.rollback(); } Here, the problem is if the error is occurred in transaction2 ...

21. Cannot commit during a managed transaction    forum.hibernate.org

I wish to use Hibernate with JTA on my JBoss server. I'm build a session bean that has several methods that will communicate with the underling Hibernate system. My main requirement is that I would like to use CMT. I'm using a Session EJB with CMT (* / Required) on JBoss 3.2.1. I have a method that interfaces with Hibernate via ...

22. Attributing a PK before commit    forum.hibernate.org

Hi, I was wondering if there is any way to ask Hibernate to assign the primary key to an object that is going to be created before the transaction commit. I'm creating an object in a transaction and need its id before commit, so that I can use it in the same transaction. I could flush the session but that would ...

23. You cannot commit during a managed transaction!    forum.hibernate.org

I am tottaly new to hibernate and here is my code: public void addUser(String name, Date date) { try { Session session= sessionFactory.openSession(); Partner partner=new Partner(); partner.setName(name); partner.setBirth(date); Transaction transaction = session.beginTransaction(); session.save(partner); transaction.commit(); session.close(); }catch(Exception ex){ logger.error(ex.toString()); } - it is in a Session bean- Every thing works fine and it even do commit to the database but gives an ...

24. Problem with auto-commit    forum.hibernate.org

I have a class Evenement and a class Utilisateur which are mapping into a Evenement's Mysql table and a Utilisateur's Mysql table as following :

25. Two Phase Commit    forum.hibernate.org

epbernard wrote: Open 2 session factories with 2 different Configuration 2-PC exists in Hibernate if your transaction manager manage it. hibernate always delegate Transaction to etiher: - JDBC - JTA Yeah, I have used 2 session factory and 2 different configuration. Look: Code: public void configureTwoPhaseCommit() throws HibernateException { Configuration cfg = new Configuration(); ...

26. Transaction.commit() throws NPE?    forum.hibernate.org

Working on a transaction involving 7 different tables. Before I throw code up since it will require some time... One of the tables always has an attempt at an insert. This insert will fail sometimes due to a unique constraint error, but I don't care if it does, so I do this... Code: ...

27. Looking for a way to do work after commit    forum.hibernate.org

I know that an object can implement the lifecycle interface if it needs to do work before save/update/delete or after load. I'm curious if there is something simialer that can be done after the save/update (after everything has been successfully commited to the datastore.) Interceptor has postFlush() but it is my understanding that at that point the transaction has not necessarilly ...

28. Get Identifier after commit    forum.hibernate.org

Forgive me if this has been asked before. I searched the forums, FAQ, and Google but could not find an answer. I have a MySQL database with an autogenerated ID column. I am using the "Identity" class in my O/R mapping. Everything works great. I need to return that Autogenerated ID number back to my app. Is there a fancy Hibernate ...

29. Session.commit() changes order of a list ?    forum.hibernate.org

The problem is that during a session.commit() it appears as if hibernate changes the order of a list. DefinitionImpl.types is a property of type java.util.List A DefinitionImpl has many TypeImpl's (1-n relation). before the commit : DefinitionImpl.types = [type[java-type(java.util.Date) index(0)], type[java-type(java.lang.Boolean) index(1)]] after the commit : DefinitionImpl.types = [type[java-type(java.lang.Boolean) index(0)], type[java-type(java.util.Date) index(1)]] mapping file for class TypeImpl: ...

30. COMMIT : no transaction in progress WARNING    forum.hibernate.org

Hi all, I'm just beginning with Hibernate ant tyr to test it with a very simple example coming from the doc. I'm using the last version of hibernate ant test it with Jonas 3.3.5 and PostgreSQL 7.3.4. Every thing goes fine until the HibernateUtil.closeSession() call where I get the following warning : [main] %-5P impl.SessionImpl - closing session [main] %-5P impl.SessionImpl ...

31. Commit Block Size and Savepoints    forum.hibernate.org

In a discussion with a DBA today, the topic of commit block sizes and how tuning the commit block size can have an impact on the disk usage of a database and potentially the performance of the database came up. Bearing in mind that I'm not a DBA, and this particular issue is somewhat new to me, I get the sense ...

32. java.lang.ClassCastException on doing transaction.commit()    forum.hibernate.org

Hi: I am implementing a Table-per-class-hierarchy stratagey. I have 3 classes CCSTransaction, ContributionTransaction and InterestTransaction.On trying to do a transaction.commit() after a write I get the following exceptions : java.lang.ClassCastException at net.sf.hibernate.type.IntegerType.set(IntegerType.java:31) at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:48) at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:35) at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:393) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:466) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at Test.main(Test.java:54) Any pointers on what I am missing ...

33. ClassCastException at Transaction.commit(): Using Pointbase    forum.hibernate.org

Hello...I am using Hibernate 2.1.3 over Pointbase 4.8. I am trying to persist an existing JavaBean value object class, so I wrote a .hbm.xml file after the fact. I did make the Java Bean Serializable, and added the toString(), hashCode(), and equals(Object other) that Hibernate would have generated from the .hbm.xml (based on code I saw in the O Reilly book.) ...

34. Commit delay / SPs    forum.hibernate.org

Hi all! I'm working with hibernate transactions and it's working very fine with the persistence of the objects. Now I'm working also with Stored procedures, and the process is taking too much time to show the data into the DB(oracle 9i) for the SP. - I'm openning transactions like this: getSession().beginTransaction(); - Executing SP like this: Connection conn = session.connection(); conn.setAutoCommit(false); ...

35. Not committing transaction blocks multiple sessions    forum.hibernate.org

Hello, I'm very new to hibernate and I wanted to get some clarification on something. I have two connection factories and I created a session from each factory. I forgot to commit a transaction on the first session and it blocked both sessions from committing my data to the database. Is this supposed to happen? I would have thought the second ...

36. SQLException:You cannot commit during a managed transaction!    forum.hibernate.org

You are right. This information was missing in the previous post: Code: package es.ameba.gtsp.onetoone; /** * @hibernate.class */ public class Street { private String name; private int number; private Long id; public Street() {} public Street(String name, int number) { ...

37. cannot commit during managed transaction problem    forum.hibernate.org

I have a simple object that I am trying to save. I get a JBoss exception as shown below. It must have something to do with using the Hibernate hilo id generator. Any ideas? JBoss4 throws : 2004-10-31 16:39:36,323 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null 2004-10-31 16:39:36,323 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] You cannot commit during a managed transaction! 2004-10-31 16:39:36,326 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] ...

38. NamingStrategy not picked up in transaction commit    forum.hibernate.org

Hi All, I am using 2.1.7, and I am setting the ImprovedNamingStrategy on my session factory. When I run the debug, however, I get net.sf.hibernate.cfg.Binder.bindProperty(Binder.java:487) DEBUG 2005-01-06 13:12:26,396 [main] - Mapped property: noExportCommunity -> noExportCommunity, type: string OK, thanks for all the help. You know how sometimes just telling others the problem leads to a solution? Well, the above happens if ...

39. Do I have to commit() on every response?    forum.hibernate.org

No I understand that, but I noticed that whenever I do transaction.commit(), the server starts connecting to the database right away, and the user has to sit there and wait for it to happen, before they get a response page. That's no big deal if I have a small commit, but what if I'm committing 10,000 statements or something? I want ...

40. trnsaction.commit executed .but tx.commit return false    forum.hibernate.org

Author Message gurav_mahesh Post subject: trnsaction.commit executed .but tx.commit return false Posted: Sat Apr 23, 2005 1:14 am Newbie Joined: Fri Apr 22, 2005 8:33 am Posts: 1 Location: pune,mumbai Read the rules before posting! http://www.hibernate.org/ForumMailingli ... AskForHelp My Query OF selecttion from Database working fine. when i insert duplicate entry of primary key error come up as duplicate ...

41. Unable to commit in a managed transaction    forum.hibernate.org

Author Message monocongo Post subject: Unable to commit in a managed transaction Posted: Fri Apr 29, 2005 3:18 am Newbie Joined: Fri Jan 07, 2005 3:18 pm Posts: 16 Location: Boulder, CO I am having trouble using Hibernate with JBoss. I do the following in my code, which is a management method of an MBean (see code below): 1) ...

42. Explicit commit?    forum.hibernate.org

Hi, Is there a way to have Hibernate persist only objects that I specifically want to save? In other words, the user may modify an object but abandon the changes -- with the standard behaviour, these changes will be persisted upon "flush". I don't want to close the session or use "evict". I want to keep the session live, but objects ...

43. Transaction don't commit    forum.hibernate.org

Hi, I am trying to use JTA transactions in my application but the transaction don't commit. I've already tried to upgrade the hibernate to version 3.x with EJB in an ambient CMT with all the EJB's methods configured to Required but it got the same problem. Below are the files that I'm using now in JBOSS 3.2.1 and Hibernate 2.1.8 with ...

44. why I loose the relation one-to-many with a commit ?    forum.hibernate.org

...

45. SessionException Committing a transaction throws an Exceptio    forum.hibernate.org

I was seeing exactly the same problem in a non-managed environment using HiberateUtil. It turned out that the session was indeed closed elsewhere in the code. But in my class, I have a DAO object that would start a new transaction. And the new transaction would start a new session. So it shouldn't have mattered that another session was closed earlier. ...

46. Commit is not Working    forum.hibernate.org

Newbie Joined: Tue Aug 09, 2005 1:42 am Posts: 8 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.0.. Database is finding to fall on an infinite loop.....No data is not saving......but method return the return statement "DATA SAVE SUCCESSFULLY" Mapping documents:

47. commit() after evict()    forum.hibernate.org

Hello, I'm charged with a fairly simple task of moving all data from one database to an identical database at a different location, deleting the data from the source. I have done this by instantiating two sessions, one for each JDBC connection. When I try to save data that has associations, I run into problems. If I try to save the ...

48. Hibernate 3.1rc1: autoClose session in commit    forum.hibernate.org

I have some problems with the changed commit behavior in Hibernate 3.1 rc1. I already read http://www.hibernate.org/42.html and I think its much easier for most applications. However one of our benchmarks now needs 4x more time. We are using the a session-per-conversation pattern. With hibernate.current_session_context_class="thread". Thus our session is closed on each commit ! That very different from the behavior in ...

49. Committing outside a Global XA Transaction    forum.hibernate.org

Using Hibernate 2.1.8 with Weblogic 8.1 and Oracle 9i, configured with JTATransactionFactory and WeblogicTransactionManagerLookup. I have been all over the forums and internet and cannot seem to find information about the following situation. I have a long running process that runs 30 seconds to a few minutes in a web application. It is required that only one user be allowed to ...

50. setting that tells Hibernate to automatically commit changes    forum.hibernate.org

This question is regarding Spring MVC and Hibernate. I have code in my SimpleFormController to break out if the cancel button is hit... I verified that it works and is not hitting my onSubmit method... but it is still saving the object with the info from the form... looking at the logs, I can see that it DID NOT enter the ...

52. Commit() problem    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.0 Hi all I am using a Hibernate and spring in my current project. I want to commit the transaction manually and wrote the following code: Session session = getSessionFactory().openSession(); Transaction tx = null; try{ tx = session.beginTransaction(); super.getTemplate().saveOrUpdate(header); }catch(Exception e){ e.printStackTrace(); }finally{ tx.commit(); if (session != null){ session.close(); ...

54. How do I restrict Hibernate from issuing auto commit?    forum.hibernate.org

Beginner Joined: Tue Jun 21, 2005 1:45 pm Posts: 38 Below are code snippets for HibernateUtil and HiberateProcessor that I'm using. My problem is hibernate issues update statements even though I dont do a transaction commit. I saw this happening when - A session is first opened and retrieves records list from table A - Loops thro the list and calls ...

55. Can I commit more than once on a Transaction?    forum.hibernate.org

Session sess = factory.openSession(); Transaction tx; try { tx = sess.beginTransaction(); [b] while(...){ //do some work ... tx.commit(); }[/b] } ...

56. bidirectional association commit issues.    forum.hibernate.org

Hi, I am having an issue with a commit that should not happen. I have a one to many association between A and B. When I create an instance of A it somehow gets placed in the current session. I tried removing any association to A from B's collection of A and removing B from A. When I flush and commit, ...

57. Transactions not committing...    forum.hibernate.org

I have some code that commits some data to the database, inside a transaction (Oracle 8i). The code works for a while, and then stops. What I mean by "working" is that the transaction is committed, and I can see it in TOAD. After a few hours, I can't see it in TOAD, but the code can see it. I am ...

58. Problem with transaction.commit    forum.hibernate.org

Hi, I'm developing a web app with oracle, hibernate and jsf and i'm having the following problem: first, each user in our app would be associated with a different session. As for now we have just one test user and so my session is lasting fot the whole of the user session. I've read a lot about this and i do ...

59. Checking if CurrentSession has an un-committed transaction    forum.hibernate.org

Im trying to postpone transaction commits until the Servlet.service is done. So I have this sort of functionality to clean up and close the session Session s = (Session) currentSessionHolder.get(); currentSessionHolder.set(null); if (s != null) { Transaction trx = s.getTransaction(); if (trx != null && trx.isActive() && !trx.wasCommitted() && !trx.wasRolledBack()) trx.commit(); s.close(); } I don't see why it shouldn't work. But ...

60. [solved] Problems with commit    forum.hibernate.org

I'm having problems when commiting a transaction. I get the following exception: Caused by: java.sql.SQLException: No more data to read from socket. It seems that the transaction is closed, or don't exist anymore. I only get that when i try to insert, i can retrieve with no problems. I don't know why this happens, any ideas? Thanks. Hibernate 3, Oracle 8, ...

61. commit of inner transaction ignored    forum.hibernate.org

Newbie Joined: Thu Aug 24, 2006 1:12 am Posts: 1 Hibernate version:Hibernate 3.2.0.cr2 Name and version of the database you are using: Oracle 9i App Server: Websphere 6.1 Other Config: Spring 2.0-rc2 Hi all, I am trying (without success) to commit an inner transaction which is declared via CMT on a SSB as RequiresNew. At runtime this txn exists within the ...

62. How to perform a simple Commit?    forum.hibernate.org

Newbie Joined: Wed Aug 30, 2006 3:06 am Posts: 2 Hi everybody, I'm new in these Forums and in Hibernate, so I have a simple cuestion I'd like to resolve. I've developed a simple example in a Java Application which connects a MySQL table to insert two rows via Hibernate. When I run the application, it seems it works correctly, but ...

63. transaction.commit() doesn't seem to work as intended    forum.hibernate.org

I have the following code for saving a new record (of users) to my MySQL 5.0.22 database: Code: User user = getuser(); Session session = null; Transaction transaction = null; String strUserId = null; try { session = HibernateSessionFactory.getSessionFactory().openSession(); transaction = session.beginTransaction(); strUserId = session.save(user).toString(); // logging ; if ...

64. XA Transaction commit order?    forum.hibernate.org

Application server: JBoss 4.0.4-GA Hibernate version: 3.2.0cr2 Name and version of the database you are using: Oracle 10g hi all, bit of a thorny (or silly) question. the setup: Ok, for some reason (don't ask), we have multiple datasources that talk to the same database (different schemas). There are referential integrity constraints between the schemas. Let's pretend we have an Orders ...

65. transaction.commit doesn't commit!!!    forum.hibernate.org

Regular Joined: Mon Oct 02, 2006 12:03 pm Posts: 62 Hello forum, I'm developing a web application with hibernate as persistence technology. I have HibernateUtil.java in order to obtain sessions --> Code: public class HibernateUtil { private static Log log = LogFactory.getLog(HibernateUtil.class); private static final SessionFactory sessionFactory; static { ...

66. NullPointerException on transaction.commit()    forum.hibernate.org

I'm testing my error-handling code. When I purposely submit bad data, "transaction.commit()" throws "org.hibernate.exception.genericJDBCException". This is expected. I re-submit the bad data. This time, NPE is thrown. I re-submit the bad data. genericJDBCException is thrown. I re-submit the bad data. NPE is thrown. etc... as I repeatedly re-submit the bad data, the exception thrown alternates between genericJDBCException and NPE. It seems ...

67. how to force a commit?    forum.hibernate.org

Hello all, I'm having a little trouble forcing data to be commited during a bulk load operation. I'll keep this as simple as I can. I have a SessionBean that runs on a TimerService to wake up, check a directory for any new data, decode it and store it in the database. After each 'saveOrUpdate' the transaction commited state returned is ...

68. Null pointer exception in transaction commit    forum.hibernate.org

Newbie Joined: Fri Mar 18, 2005 8:54 am Posts: 4 Hibernate version: Hibernate3-3.2.0 Full stack trace of any exception that occurs: 12:17:59,968 ERROR [SessionFactoryUtils] Unexpected exception on closing Hibernate Session java.lang.NullPointerException at org.hibernate.jdbc.AbstractBatcher.closeStatements(AbstractBatcher.java:310) at org.hibernate.jdbc.ConnectionManager.cleanup(ConnectionManager.java:376) at org.hibernate.jdbc.ConnectionManager.close(ConnectionManager.java:318) at org.hibernate.impl.SessionImpl.close(SessionImpl.java:298) at org.springframework.orm.hibernate3.SessionFactoryUtils.doClose(SessionFactoryUtils.java:787) at org.springframework.orm.hibernate3.SessionFactoryUtils.closeSessionOrRegisterDeferredClose(SessionFactoryUtils.java:775) at org.springframework.orm.hibernate3.SessionFactoryUtils.releaseSession(SessionFactoryUtils.java:748) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCleanupAfterCompletion(HibernateTransactionManager.java:662) at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:754) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:541) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:267) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) ...

69. commit session crashes    forum.hibernate.org

Hibernate version: 3.2 Code between sessionFactory.openSession() and session.close(): Session session = HibernateUtil.getSession(); session.beginTransaction(); for (MyObjA o : MyObjASet) session.save(o); session.update(MyObjB); MyObjB.getMyObjAList().addAll(MyObjASet); session.getTransaction().commit(); Full stack trace of any exception that occurs: 13/08/2007 18:16:06 [ERROR] org.hibernate.util.JDBCExceptionReporter - failed batch 13/08/2007 18:16:06 [ERROR] org.hibernate.util.JDBCExceptionReporter - failed batch 13/08/2007 18:16:06 [ERROR] org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Could not execute JDBC ...

70. What will happen if function did not commit transaction    forum.hibernate.org

Dear Experts, recently I faced a problem in Hibernate complaining the session is closed whenever I called transaction.commit. Digging on the code, I found the culprit is actually a function (function A) that did not commit its transaction. The problem would occur if I call the function A several times then call another function that involve database update, then the error ...

71. How to make sure every transation is committed?    forum.hibernate.org

Hi all, I am using JDBC transaction management in my JSF application running on tomcat. I am however wondering how to make sure that all queries are committed (which I think is required?). For example, I have a JSF detail page to show everything of a project. First I do a get of the project: Code: public Project ...

72. Logical transaction - commit    forum.hibernate.org

Hibernate version:3.2.6 Name and version of the database you are using:Oracle 9 Hi, I am new to hibernate. Please help me with the following problem. i doing a logical transaction which involves more than two database operations i want to commit only if all the database operations have successfully executed. My code structure looks like.. //business class sessionFactory.openSession(); dao1.method1(); dao2.method3() //i ...

73. Transaction with Blobs - System halts at commit    forum.hibernate.org

Hi everyone, I have a transaction which includes adding 5 records in a table, which includes a Blob (pdf file) as one of its columns. The tables are in an oracle database. I'm using tomcat 6 as app server and Hibernate for persistence framework. When i run my application, the system halts when i try to commit the transaction. When i ...

74. Could not commit transaction, one (or more) of the resources    forum.hibernate.org

twentysix Post subject: Posted: Fri Jun 13, 2008 12:45 pm Newbie Joined: Fri Jun 13, 2008 12:11 pm Posts: 4 Thanks for the quick reply! I can provide the entity and the mapping file, but this is all I have of the stack trace (hence the difficult investigation!). To be honest, even some ideas for common causes would help! ...

75. Commit and sometimes not    forum.hibernate.org

Hi, I got a litte problem using hibernate. I'm using it within an axis2 webservice and it works fine so far. But sometimes I reach some strange problems: Let's assume the following: We have 2 Webservices called "A" and "B", each having methods "a" and "b". We have the following information flow: Method "a" of Service "A" is called, opens a ...

76. Commit at the end of a transaction gets progressively slower    forum.hibernate.org

I am using hibernate 3.2.4.sp1, postgres 8.3.7 and Seam 2.1. I am experiencing a very strange behavior with our application in terms of transaction commit, and I am not able to pinpoint what is causing this. Not even sure if it is hibernate or postgres. I kick off a an asynchronous job (SLSB annotated with @Asynchronous) from a web request. This ...

77. How to achive 2 phase commit with Hibernate    forum.hibernate.org