mysql « Transaction « Spring Q&A





1. Spring DatasourceTransaction Manager Problem    stackoverflow.com

final DataSource ds = DataSourceLocator.getInstance()
    .getDataSource(sg.cmpl.starhub.lprs.Constants.APP_KEY);
final DataSourceTransactionManager txManager = new DataSourceTransactionManager();
txManager.setDataSource(ds);

final DefaultTransactionDefinition def = new DefaultTransactionDefinition();
def.setIsolationLevel(TransactionDefinition.ISOLATION_READ_COMMITTED);
final TransactionStatus status = txManager.getTransaction(def);

Connection conn = null;
PreparedStatement ps = null;

try {

  ...

2. Spring, iBatis, MySQL - how to manage transactions?    stackoverflow.com

Hello I'm building a web application with spring ibatis and mysql. I'm going to use mysql stored procedures and I will call them with ibatis. My question is about how to manage the ...

3. Can Spring transactions provide the necessary mutual exclusion if DB calls are coming from multiple machines    stackoverflow.com

I'm porting a class from plain JDBC to use Spring. Part of this class consists of a block that find the most recent row, updates a field, and selects it ...

4. Hibernate deletion issue    stackoverflow.com

I'm trying to write a Java app that imports a data file. The process is as follows

  1. Create Transaction
  2. Delete all rows from datatable
  3. Load data file into datatable
  4. Commit OR Rollback if any ...

5. Ibatis startBatch() only works with SqlMapClient's own start and commit transactions, not with Spring-managed ones    stackoverflow.com

I'm finding that even though I have code wrapped by Spring transactions, and it commits/rolls back when I would expect, in order to make use of JDBC batching when using Ibatis ...

6. Long running transactions with Spring and Hibernate?    stackoverflow.com

The underlying problem I want to solve is running a task that generates several temporary tables in MySQL, which need to stay around long enough to fetch results from Java after ...

7. Outer transaction in a nested transaction use case isn't seeing updates persisted in database (JPA, MySQL, Spring Framework, and Hibernate)    stackoverflow.com

I have a case where a transaction is started and along the way (in the code) a method gets called that starts a new transaction. When the inner transaction completes, the ...

8. How to use LOCK IN SHARE MODE with hibernate/spring?    stackoverflow.com

I'm running into a deadlock scenario when using MySQL and Hibernate (with Spring). I'm getting the following exception message:

could not get or update next value; SQL[null]; nested exception ...

9. Hibernate/Spring: getHibernateTemplate().save(...) Freezes/Hangs    stackoverflow.com

I'm using Hibernate and Spring with the DAO pattern (all Hibernate dependencies in a *DAO.java class). I have nine unit tests (JUnit) which create some business objects, save them, and perform ...





10. Spring Hibernate MySQL Test doesn't roll back    stackoverflow.com

I have a problem with transactional tests using Spring 3.0.5, Hibernate 3 and MySQL 5. In logs it seems there's everything OK and transaction rolls back, but I got record inserted into ...

11. simple optimistic lock question in jpa/spring/hibernate    stackoverflow.com

I am trying to implement a basic optimistic lock mechanism with a retry interceptor. So the thing is there is a object Quiz with a property responsesCount. In case that there is ...

12. simple design question about optimistic locking in spring/jpa/hibernate    stackoverflow.com

I have an object GeneralKnowledgeTest and it contains a lot of statistics fields (ratingsCount, responsesCount, ratingStars ...) which are updated every time a user will take that test (takeTest() -> ...

13. Spring-JPA-Hibernate writing to the DB fails (delaying identity-insert due to no transaction in progress)    stackoverflow.com

I am using Spring 3.0.5.RELEASE and Hibernate 3.6.1.Final. Reading from the MySql DB is ok, but when I try writing to it I get this in the log:

22 mars 2011 22:37:34,625 ...

14. Transaction Management with Spring, Hibernate and mySQL    stackoverflow.com

Im working on a webapplication with Spring Framework 3 and Hibernate 3.6 and I try to understand how transaction management works. I use mySQL Server 5.1 with InnoDB tables. I wrote my ...

15. Transaction Management with Spring, Hibernate and mySQL, additional questions (using hibernate without transactions..)    stackoverflow.com

Im working on developing a webapplication with Spring Framework 3.0.5 and Hibernate Framework 3.6 and Ive got some questions to it. I use Transaction Management with Annotations. (@Transactional) and my DAO ...

16. Viewing Data From Transactional Tests - Hibernate + Spring + MySQL    stackoverflow.com

I have a bunch of tests in a Hibernate/Spring application. Yesterday, I transitioned them from using the JUnit 3.8 base test class provided by Spring to the JUnit 4.4 one. Everything works ...





17. Spring, Hibernate, MySQL - How Transactions work - Conclusion/Questions**    stackoverflow.com

I work with the Spring Framework 3.0.5, Hibernate 3.6 and MySQL Server 5.1. Ive got some questions regarding the transaction management in general. I personally use declarative transaction management from spring. ...

18. Can't get Spring transaction to rollback (java+mysql)    stackoverflow.com

Last week I finally got around to making my app use transactions. I am using Spring declarative transactions, and I know that the transactions themselves are working, as it made ...

19. Transaction management in Spring 2 and hibernate 3 and Mysql sample application    stackoverflow.com

This is my "springexample-hibernate.xml" configuration xml

<bean id="exampleDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.Driver" />
    <property name="url" value="jdbc:mysql://localhost:3306/betatd" />
    <property name="username" value="root" />
   ...

20. How to lock and reload an entity correctly    stackoverflow.com

In my web application I have several threads that potentially access the same data concurrently why I decided to implement optimistic (versioning) and pessimistic locking with Hibernate. Currently I use the ...

21. hibernate transaction not rolling back correctly    stackoverflow.com

I have 2 tables, say Item and Property and a hibernate object mapped to both. The mapping for table Item to Property looks like

<set name="propertySet" cascade="all-delete-orphan">
    <key column="item_id" ...

22. Hibernate transaction takes more than a minute    stackoverflow.com

I have a Spring/Hibernate webapp which interacts with mysql (all tables are running on INNODB) I have a simple transaction to create a profile. Sample code is provided at the end of ...

23. Transaction problems with Hibernate and MySQL    forum.springsource.org

Transaction problems with Hibernate and MySQL Hi, i'm experiencing some transaction problems when using spring's HibernateTemplates. Basically, i do this: public void addProveedor(IProveedor prov) throws DataAccessException { getHibernateTemplate().saveOrUpdate(prov); } An invocation ...

24. Mysql, hibernate, spring transaction not rolling back    forum.springsource.org

Mysql, hibernate, spring transaction not rolling back Hi, I know this is a common topic, but, I am posting this after a lot search hasn't helped. I am using spring, hibernate,c3p0 ...

25. Spring3, Hibernate, MySQL - How do I add transactions control??    forum.springsource.org

Spring3, Hibernate, MySQL - How do I add transactions control?? I would like to find out how to add transaction control to the following so if one of the calls do ...

26. transaction problem updating a standalone Java/Hibernate/MySQL app to Spring    forum.springsource.org

May 29th, 2011, 08:59 PM #1 kerchunk View Profile View Forum Posts Private Message Junior Member Join Date May 2011 Posts 9 transaction problem updating a standalone Java/Hibernate/MySQL app to Spring ...

27. Spring + Hibernate + MySql Transaction not rolling back    forum.springsource.org

Dec 17th, 2004, 12:08 PM #1 dondon View Profile View Forum Posts Private Message Junior Member Join Date Dec 2004 Posts 2 Spring + Hibernate + MySql Transaction not rolling back ...

28. Hibernate+Spring+Oracle+MySQL without a Server -> Synchronize/Update issue    forum.springsource.org

Hi all, I'm a Spring beginner and developing a stand-alone application without a J2EE or web server. The application is used to parse, evaluate and save data. In doing so, a ...

29. Spring & IBatis & MySql & Transactions    forum.springsource.org

I am having trouble to configure my application with Spring & IBatis & MySql & Transactions. Does anyone have a successfull configuration? The main problem is that I can't rollback in ...

30. Regarding Transaction roll back in MySQL    forum.springsource.org

Regarding Transaction roll back in MySQL Hi, i m using trasaction annotations to my service method.It gives me following exception while roll backing the trascation: Code: 006-05-16 11:42:37,703 [http-8080-Processor22] ERROR org.hibernate.transaction.JDBCTransaction ...

31. MySQL JdbTemplate Declarative Transaction    forum.springsource.org

Oct 12th, 2006, 07:51 PM #1 jrenck View Profile View Forum Posts Private Message Junior Member Join Date Oct 2006 Posts 27 MySQL JdbTemplate Declarative Transaction Hi, I'm facing a problem ...

32. Transaction differences between MySQL and Oracle    forum.springsource.org

Transaction differences between MySQL and Oracle Im currently migrating an application from MySQL 4.1 (with InnoDB) to Oracle 9.2. The application is based on Spring and Hibernate and uses some JDBC ...

33. Hibernate + MySql + Transactions = ?nothing    forum.springsource.org

May 21st, 2007, 05:52 PM #1 richmorrison View Profile View Forum Posts Private Message Junior Member Join Date Aug 2006 Posts 10 Hibernate + MySql + Transactions = ?nothing First attempt ...

34. Transactions not working w/Spring/Hibernate/MySQL    forum.springsource.org

Jun 6th, 2007, 05:33 PM #1 mbiteman View Profile View Forum Posts Private Message Junior Member Join Date May 2007 Posts 4 Transactions not working w/Spring/Hibernate/MySQL I really hope someone out ...

35. MySQL procs and read-only transactions    forum.springsource.org

MySQL procs and read-only transactions Hi all I'm using Spring 2.0, Hibernate 3.1 and MySQL 5.1 I have read-only transactions setup for any get* methods in my service package eg Code: ...

36. MySQL 5 and XA Transactions Failing    forum.springsource.org

Jul 23rd, 2007, 02:54 PM #1 tnine View Profile View Forum Posts Private Message Member Join Date Nov 2004 Posts 93 MySQL 5 and XA Transactions Failing Hi all, I'm connecting ...

37. Spring's transaction & MySQL    forum.springsource.org

Yes, it does. MyISAM tables do not support transactions, so you wont actually get transactions even if you configure them in Spring. You should use InnoDB if you care about transactions. ...

38. I want to use MySQL, Spring but not Hilbernate for transactions    forum.springsource.org

I want to use MySQL, Spring but not Hilbernate for transactions Hi all, I would like some tips or ideas. I would like to add transaction support to my webapp but ...

39. Hibernate/MySQL transaction rollback does not work    forum.springsource.org

Hibernate/MySQL transaction rollback does not work Hi, I am using Spring: 2.5.1 Hibernate: 3.2 MySQL: 4.1.20 I created a junit test. And I made it @Transactional, so by default it should ...

40. JTA Transaction Issue with MySQL    forum.springsource.org

JTA Transaction Issue with MySQL So here's the scenario... 1) User clicks link 2) Controller calls service layer (JTA transaction is started) 3) Service layer uses hibernate to retrieve list of ...

41. transaction is not commiting once insert/update to mysql DB using JDBC template    forum.springsource.org

transaction is not commiting once insert/update to mysql DB using JDBC template Hi All, I am facing typical problem. We are using Weblogic server and Mysql DB. JDBC Template frame work ...

42. Transaction management (Spring + Hibernate + MySQL)    forum.springsource.org

Nov 17th, 2008, 10:45 AM #1 jmichel View Profile View Forum Posts Private Message Junior Member Join Date Nov 2008 Posts 3 Transaction management (Spring + Hibernate + MySQL) Hi guys, ...

43. JPA and readonly transactions when using mysql replication driver    forum.springsource.org

JPA and readonly transactions when using mysql replication driver I'm using Spring 2.5.2/HibernateJpaVendorAdapter/JpaTransactionManager/MySQLReplicationDriver. If connection.isReadOnly() is true then MySQL's ReplicationDriver uses one of the slave databases, otherwise it uses the master ...

44. JPA JTA, JPA Hibernate, MySql Collection    forum.springsource.org

JPA JTA, JPA Hibernate, MySql Collection Hello devs! Currently I am developing a web application with Spring, JPA/Hibernate, MySql. Spring and JPA Hibernate, all these are new Topics for me. I ...

45. Transaction management and MySQL    forum.springsource.org

Transaction management and MySQL Hello, I have the following lines in the applicationContext.xml: Now I want to use @Transactional annotations to ...

46. Transaction pb Hibernate/MySQL    forum.springsource.org

Aug 28th, 2004, 09:24 AM #1 syluser View Profile View Forum Posts Private Message Junior Member Join Date Aug 2004 Posts 3 Transaction pb Hibernate/MySQL Hi, I have a problem with ...