jdbc « Transaction « Spring Q&A





1. How to do simple Spring JDBC transactions outside the IoC container?    stackoverflow.com

The project I'm working on uses straight JDBC data access in all its boilerplate glory and doesn't use any transactions. I feel like using transactions and simplifying the way data access ...

2. easy transactions using spring jdbc?    stackoverflow.com

I am working on a java app that uses Spring IOC and JDBC Template classes. I have a DAO class that has 4 methods : m1() to m4(). m1 performs multiple ...

3. Validating that all JDBC calls happen within a transaction    stackoverflow.com

How can I validate that all JDBC access happens on an active transaction, i.e. java.sql.Connection.getAutoCommit() always return false? I'm using Spring for transaction management ( @Transactional ) and Hibernate for data access.


4. What transaction manager should I use for JBDC template When using JPA?    stackoverflow.com

I am using standard JPA transaction manager for my JPA transactions. However, now I want to add some JDBC entities which will share the same 'datasource'. How can I make the ...

5. Transaction rollback on Spring JDBC tests    stackoverflow.com

I'm trying to get JDBC transaction rollback when using Spring-test without success. When I run the following the SQL update is always committed.

package my.dao.impl;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import ...

6. Hibernate and JDBC in one transaction    stackoverflow.com

I have a method, marked as @Transactional. It consists of several functions, one of them uses JDBC and the second one - Hibernate, third - JDBC. The problem is that changes, made by ...

7. Error inserting new parent-child records in transaction using Spring JDBC    stackoverflow.com

I have 2 tables (Item and Code) with relation one to many(one Item can have many Codes - this is implemented on db level with foreign key). When I am trying ...

8. Transaction rollbacks, but a record is inserted    stackoverflow.com

Hi all I have done an application configuration using jsf ,spring 3.0,hybernate + JPA and atomikos for XA transcation management and mysql is my backend,here every thing is ...

9. Isolating a spring JDBC transaction from a hibernate transaction    stackoverflow.com

In spring the HibernateTransactionManager uses the SessionFactory it was initialised with to "bind" a Session to the current thread context when creating a new transaction. Then when HibernateTemplate is used ...





10. Spring Programmatic Jdbc Transaction rollback doesn't work    stackoverflow.com

I use spring transaction to include a few db update operation into a single transaction. let say there 2 db updates within a single transaction. the update 1 is successful while ...

11. Spring Jdbc declarative transactions created but not doing anything    stackoverflow.com

I have tried to configure declarative transaction management within my Spring-based web application and it refuses to cooperate with me. I have two main problems:

  1. Setting defaultAutoCommit to false on our dataSource (which ...

12. maintaining transcations in spring jdbc template    stackoverflow.com

Suppose i want to insert records in 10 different tables and this should be atomic, menaing either all insert should happen in all tables or none.How can this transcation be maintained ...

13. How to implement transactional MessageStore strategy in spring integration?    stackoverflow.com

My publisher component publishes messages to a jdbc message store backed queue channel. My requirement is that the messages should not be delivered to the queue if the publisher thread encounters ...

14. How can we implement a nested transaction in JDBC?    stackoverflow.com

First let me explain you what I mean by a nested transaction. Example: say in the main class we call method1 and create the customer using jdbc[Transaction1]. It is not commited yet. ...

15. Is there a performance penalty in executing read only queries under transaction?    stackoverflow.com

Is there any performance penalty to define all methods as transactional using Spring AOP based declarative transaction management? See the config below. The reason is that I do not know what ...

16. Transaction management using jdbc template    forum.springsource.org

Transaction management using jdbc template Hello , I am facing an issue - will explain it as follows: Step 1 > We are reading records off a database table - there ...





17. TransactionManager for Hibernate and plain JDBC access fails    forum.springsource.org

TransactionManager for Hibernate and plain JDBC access fails Hello, First a little bit about my environment. I use the spring-framework 1.1 and have a problem with the transaction management. I would ...

18. Spring Jdbc declarative transactions created but not doing anything    forum.springsource.org

Apr 1st, 2011, 12:59 PM #1 HarleyQ14 View Profile View Forum Posts Private Message Junior Member Join Date Nov 2010 Location Canada Posts 8 Spring Jdbc declarative transactions created but not ...

19. JDBC Transaction inner methods and rollback    forum.springsource.org

JDBC Transaction inner methods and rollback Hi, I have successfully used spring to manage my transactions (using xml declaration). I have a new case which is not working for me. I ...

20. Transaction Management with JDBC    forum.springsource.org

Transaction Management with JDBC Hi All, I have a small spring 3 mvc application for one of my clients and we are using jdbc. I have been reading Spring in Action ...

21. Transactions are not rolling back JDBC    forum.springsource.org

Transactions are not rolling back JDBC Hi All, I am having problems getting the spring transaction manager to rollback one jdbc insert statement that is called from my mvc controller. After ...

22. declarative transaction via JDBC    forum.springsource.org

declarative transaction via JDBC I am trying to setup declarative transaction with spring. Hence I am not really familiar with the concept I may done stupid mistakes. But any way it ...

23. Spring Transaction with simple JDBC.    forum.springsource.org

Spring Transaction with simple JDBC. Hi, I have an old application which is using the simple JDBC, means Statements and PreparedStatments, for the Database query and update. Now I am integrating ...

24. Spring 3.0.6 Transaction Management not releasing JDBC connections    forum.springsource.org

Spring 3.0.6 Transaction Management not releasing JDBC connections Hi, I am using Spring 3.0.6 in my project and all the business processing is happening within Oracle PL/SQL procs (Oracle version in ...

25. Need help on JDBC Rollback..    forum.springsource.org

Dec 21st, 2004, 01:46 PM #1 Intruder View Profile View Forum Posts Private Message Junior Member Join Date Dec 2004 Posts 3 Need help on JDBC Rollback.. Hi folks, Here's the ...

26. my JDBC Operation Classes,Use TransactionProxyFactoryBean?    forum.springsource.org

my JDBC Operation Classes,Use TransactionProxyFactoryBean? in my project,i have some classes to repack the jdbc opertions,but not use jdbctemplate, and my classes is not threadsafe. my classes repacking prePareStatement,statement and so ...

27. Problems with declarative jdbc transactions    forum.springsource.org

Problems with declarative jdbc transactions Hi, i have serious problems with jdbc declarative transactions on spring i think i'm doing something wrong. i have this configuration on my beans.xml

28. Transaction abort by JDBC driver?    forum.springsource.org

Transaction abort by JDBC driver? I am experiencing a strange problem: I fired an optimistic insertion. The insert fails due a violation of a unique constraint. Since it fails, I wanted ...

29. Spring + JDBC + Transaction    forum.springsource.org

Spring + JDBC + Transaction Hi, i couldn't find the right topic for my question in the forum. I have probably a simple question. I'm using spring for data access with ...

30. How to use Hibernate and JDBC under the same transaction?    forum.springsource.org

How to use Hibernate and JDBC under the same transaction? I just implemented a DAO layer using Spring and Hibernate, and I'm really impressed how less efforts it took comparing to ...

31. Mixing Hibernate Transactions and JDBC Transactions    forum.springsource.org

Hello, It's just a thought, haven't tried yet. Is it possible to mix both transaction managers? Let's say I have JDBC and Hibernate DAOs. And one of my services I have: ...

32. transaction trouble mixing Hibernate and plain JDBC    forum.springsource.org

Dec 7th, 2005, 04:30 PM #1 dseale View Profile View Forum Posts Private Message Junior Member Join Date Dec 2005 Posts 7 transaction trouble mixing Hibernate and plain JDBC I have ...

33. Declarative transactions for JDBC applications not working(without Spring templates)    forum.springsource.org

HTML Code: public class TestObject extends DataAccess { public void doWithTransaction() throws SQLException{ doWithTransaction1(); throwsException(); } public void doWithTransaction1() throws SQLException { Connection c=getConnection(); final Statement st = c.createStatement(); st.execute("update person ...

34. Hibernate and JDBC Transaction Manager using the same transaction?    forum.springsource.org

Mar 7th, 2006, 08:29 AM #1 Freebird View Profile View Forum Posts Private Message Junior Member Join Date Jan 2006 Posts 6 Hibernate and JDBC Transaction Manager using the same transaction? ...

35. Confused with JDBC Transactions in Spring    forum.springsource.org

Confused with JDBC Transactions in Spring Hi, I'm trying to execute JDBCTemplate queries and myStoredProcedure instances inside JDBC Transactions. After reading Spring Reference Document Chapter 8, I decided to use Programmatic ...

36. Combining JDBC and Hibernate Transactions problem    forum.springsource.org

Combining JDBC and Hibernate Transactions problem Hello there! I've already run in this problem but, can't find how to get it to work... I have both JDBC and Hibernate DAOs on ...

37. Excecute three update queries in one transaction using Spring JDBC    forum.springsource.org

I want to excecute three update queries, If all queries are excecuted sucessfully, then only commit the transaction otherwise rollback the transaction using Spring JDBC. Please help me on that if ...

38. Explicit JDBC access conrtrol, rollback problem    forum.springsource.org

Explicit JDBC access conrtrol, rollback problem I am a bit flustered after 2 days of experiementing and reading docs and forums. I cannot seem to get multiple calls to a stored ...

39. JTA and JDBC SavePoints    forum.springsource.org

Hi I haven't been able to find any documentation on using JDBC 3.0 SavePoints under JTA. Does anyone here know if it's possible to make SavePoints work under JTA or if ...

40. Standalone programatic JDBC Transaction Not Working    forum.springsource.org

Standalone programatic JDBC Transaction Not Working I'm trying to test the JDBC Transaction Mgmt provided by Spring using a programatic approch, and I am not able to get it working.. I ...

41. No JDBC connection can be made because the transaction state is Marked Rollback    forum.springsource.org

No JDBC connection can be made because the transaction state is Marked Rollback Hi guys, I am new to Hibernate-Spring Framework and we are seeing a lot of exception like the ...

42. Spring JDBC Hibernate and Declared Transaction    forum.springsource.org

Spring JDBC Hibernate and Declared Transaction Hi All, I have a bit of a problem. I have configured declarative transactions on a bean that uses Spring JDBC (for SP calls) and ...

43. org.hibernate.TransactionException: JDBC rollback failed    forum.springsource.org

org.hibernate.TransactionException: JDBC rollback failed Hi all, Can the following exception come in a transaction which only fetches the data and does not do any commit or rollback? Thanks -Jitesh [3/14/07 7:54:41:034 ...

44. Could not reset JDBC Connection after transaction    forum.springsource.org

Could not reset JDBC Connection after transaction Hi all, I am using Spring SqlMapClientDaoSupport + Ibatis to access DB2e database. I am using Spring Transaction management with this configuration information: - ...

45. Jdbc - Transaction per request    forum.springsource.org

hi, I am using jdbcdaosupport for data access. what i want to do is to setup transaction management such that a transaction spans an http request. I am familiar with setting ...

46. Declarative Transactions Spring 2 - Plain JDBC    forum.springsource.org

Declarative Transactions Spring 2 - Plain JDBC Hi, I am trying to setup Declarative Txn boundary as given in the doc - http://static.springframework.org/sp...ansaction.html ..however i am running into some issues. What ...

47. Declarative transactions with simple JDBC    forum.springsource.org

Jun 29th, 2007, 07:20 PM #1 djcampbell View Profile View Forum Posts Private Message Junior Member Join Date Dec 2005 Posts 16 Declarative transactions with simple JDBC Yes, another person with ...

48. JDBC rollback failed    forum.springsource.org

Jul 3rd, 2007, 06:43 AM #1 tarjoadi View Profile View Forum Posts Private Message Junior Member Join Date Sep 2006 Posts 21 JDBC rollback failed Hi, I have a Spring +Hibernate ...

49. Spring JDBC and Transaction Mgmt    forum.springsource.org

Spring JDBC and Transaction Mgmt Hi: I am inserting rows into two tables, one in Oracle database and the other in MS SQL Server. The program works fine. Now I want ...

50. org.springframework.transaction.IllegalTransaction StateException: Pre-bound JDBC Con    forum.springsource.org

org.springframework.transaction.IllegalTransaction StateException: Pre-bound JDBC Con There have been a few posts on the subject before but I've not really gained much headway in the problem. Code: org.springframework.transaction.IllegalTransactionStateException: Pre-bound JDBC Connection found! ...

51. Problems with Spring JDBC Transaction Management    forum.springsource.org

Problems with Spring JDBC Transaction Management Hi All, I have used spring aop for transaction management with hibernate and jdbc. With hibernate the tx management is working fine and the database ...

52. declarative transaction managment JDBC & HIBERNATE    forum.springsource.org

declarative transaction managment JDBC & HIBERNATE Hi, for my application I use hibernate for insert functionality but for search functionality I want to use JDBC (performance reason). This is my configuration ...

53. Transactions and moving from Spring JDBC to Hibernate    forum.springsource.org

Hi, I have an application that makes extensive use of Spring JDBC with annotation-driven transactions. I am introducing Hibernate and want to use annotation-driven transactions whilst keeping all the existing jdbc ...

54. Toplink Sharing Transaction with JDBC    forum.springsource.org

Toplink Sharing Transaction with JDBC In order to generate and call some anonymous PL/SQL blocks (to deal with Oracle associative arrays used in legacy code) we are using JdbcDaoSupport. The rest ...

55. Spring Transactions and raw JDBC    forum.springsource.org

Spring Transactions and raw JDBC I'm having difficulty with testing out Spring transactions. I'm trying to see how Spring transactions rollback when there are two DAOs involved. The DAOs are using ...

56. jdbc transactions    forum.springsource.org

jdbc transactions Hi - We use Spring JDBC in our project and almost all the DB activity like inserts/update/delete and selects have been done using the Stored procedures (SP) and functions. ...

57. transaction manager with annotation for JDBC + hibernate    forum.springsource.org

transaction manager with annotation for JDBC + hibernate hi, I plan to use hibernate and jdbc together in a web application. so i have 2 DAO interface and it decoupling from ...

58. Transactions / Hibernate AND JDBC    forum.springsource.org

Transactions / Hibernate AND JDBC Hello together! Is it general possible (or more precisely advisable) to span transaction-boundarys arround a Hibernate Session and after processings within that session a JdbcTemplate for ...

59. Which TransactionManager with a JDBC and Hibernate ?    forum.springsource.org

Hello, I would appreciate it if you could give me some suggestions I need to use "JDBC" and "Hibernate" in a transactional context : - sometimes together in the same transaction ...

60. How to make 2 JDBC calls as a single Transaction    forum.springsource.org

Hi I have multiple JDBC calls and want to roll back the entire service if anyone of them fails. How to achive this. Any advice is appreciable. Thanks -CHandu

61. Mixing Hibernate and JDBC transactions    forum.springsource.org

Mixing Hibernate and JDBC transactions Let me try asking this question another way to see if anyone can help. We have multiple webapps running multiple hibernate session factories, however, they are ...

62. declarative transaction with spring and JDBC    forum.springsource.org

Iam trying to do declarative transaction management using spring and jdbc. I find that the transaction is not being rolled when an exception occurs. Could anyone point out if anything is ...

63. manage hibernate and jdbc in single transaction..    forum.springsource.org

Hi, In our project we were using both hibernate and JDBC. Our requirement is that data access thru both hibernate and JDBC should come under single transaction. wat transaction manager can ...

64. Problem with JPA OneToMany relation in mixed JPA/JDBC Transactions    forum.springsource.org

Problem with JPA OneToMany relation in mixed JPA/JDBC Transactions Hi, When writing some tests for my Jpa dao classes, extending AbstractJpaTests, I found an issue when using jdbcTemplate() to seed data ...

65. Could not open JDBC connection for transaction.    forum.springsource.org

Having an issue getting JNDI working with Tomcat. I've configured my web.xml inside my project with this; Code: MySql NestleServletDataFetcher javax.sql.DataSource Container and the Tomcat5.5.20 server.xml is configured with: ...

66. Spring JDBC Transaction    forum.springsource.org

Spring JDBC Transaction hi i am new new to spring i am using JDBC Template for database access. now i my application needs transaction. this is my JNDI.xml

67. JTA and JDBC Legacy Code    forum.springsource.org

JTA and JDBC Legacy Code We have existing legacy code that uses jdbc (connections, prepared statements, etc.) to update a DB2 database. We use WebSphere 6.1. A connection is obtained from ...

68. Transaction with both Hibernate and JDBC?    forum.springsource.org

Transaction with both Hibernate and JDBC? Hello I am not sure if this is a stupid questions, abut after reading some books, I am still not sure if this is possible ...

69. Problem during save, JDBC rollback failed due to Connection Closed    forum.springsource.org

HTML Code: 09:38:37,761 INFO [Server] JBoss (MX MicroKernel) [4.0.0 (build: CVSTag=JBoss_4_0_0 date=200409200418)] Started in 22s:128ms 09:40:10,156 INFO [DataLoaderImpl] Saving IDataContainerTransferObject 09:40:43,944 ERROR [LogInterceptor] RuntimeException in method: public abstract void com.comp.at.ejb.DataLoaderRemote.saveToDatabase(com.comp.at.business.IDataContainerTransferObject) throws ...

70. jdbc rollback with Spring managed transactions    forum.springsource.org

jdbc rollback with Spring managed transactions I want to wrap some legacy JDBC code. Ive read all the docs and tried various ways of doing it but the rollback never happens. ...

71. Clarification about Spring-test's transactional jdbc tests    forum.springsource.org

For example, you might query before and after testing application code that creates an object and persists it using an ORM tool, to verify that the data appears in the database. ...

72. JDBC - Transcation rollback    forum.springsource.org

why you set "processCDREngine" bean abstract and meanwhile you set "target" property of it? if you want make it abstract, here is an example:

73. ClassCastException springframework.transaction and springframework.jdbc bundles    forum.springsource.org

ClassCastException springframework.transaction and springframework.jdbc bundles Hi, I'm using spring.jdbc and spring.transaction in an OSGI-environment (RCP-application) together with an mysql fragment for the database access. The relevant packages from org.springframework.jdbc, org.springframework.transaction etc. ...

74. Jdbc exception vs. transaction    forum.springsource.org

Hi all, I have a following method: Code: @Transactional public void foo() { try { jdbcTemplate.execute(sqlStatement1); } catch(DataAccessException e) { logger.info("SQL statement 1 failed.", e); } try { jdbcTemplate.execute(sqlStatement2); } catch(DataAccessException ...

75. Jdbc Transcation rollback not working    forum.springsource.org

public boolean executeScript(byte[] decrypteddata_){ javax.sql.DataSource ds=(javax.sql.DataSource) dsmg.getDataSource(); JdbcTemplate jdbctemp=new JdbcTemplate(ds); dbConn=jdbctemp.getDataSource().getConnection();

76. about Spring jdbc transaction question?? very important for me    forum.springsource.org

about Spring jdbc transaction question?? very important for me My project use Spring transaction spring config like this:

77. Transactions with Hibernate and JDBC    forum.springsource.org

78. Using non-annotated Spring JDBC within an annotated transaction    forum.springsource.org

Using non-annotated Spring JDBC within an annotated transaction In our current development we are using Spring 2.5.X, Hibernate and JTA (WebLogic 10.3). The transactions work fine. However we have to use ...

79. Not exposing JPA transaction as JDBC transaction because JpaDialect does not support    forum.springsource.org

Not exposing JPA transaction as JDBC transaction because JpaDialect does not support Hi, I noticed in the logs this: Code: org.springframework.orm.jpa.JpaTransactionManager - Creating new transaction with name [madclip.service.DataService.fetch]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly org.springframework.orm.jpa.JpaTransactionManager - ...

80. Spring JDBC does not support transactions    forum.springsource.org

Thank you for a reply. I have been trying to get it to work with no success. Here is a snippet from spring-jdbc.xml: Code: ...

81. Spring JDBC Transaction vs Connection ?    forum.springsource.org

someone please clear my doubt .. please first look into my attached code Now the connection created by spring is 14:15:12,531 DEBUG DataSourceTransactionManager:222 - Switching JDBC Connection [org.hsqldb.jdbc.jdbcConnection@456a456a] to manual commit ...

82. JDBC Transactions    forum.springsource.org

JDBC Transactions Hi I am using Spring Roo to build a Swing application that calls some Stored Procedures using JDBC. I have some service methods that call multiple procedures and would ...

83. An update and then select in same transaction using spring jdbc    forum.springsource.org

An update and then select in same transaction using spring jdbc Hi, I am implementing a sequencing logic using a database table as sequence generator. To generate cluster safe ids I ...

84. Transaction not working with direct JDBC call when used with JPA    forum.springsource.org

Transaction not working with direct JDBC call when used with JPA I am converting a JBoss EJB3 application to Spring3 JPA. I have converted the SessionBean Facade class to a Spring ...

85. TransactionManager: Always execute jdbc call right after a transaction is opened    forum.springsource.org

Greetings all, I am using the classic AOP approach to transaction management in my application with pointcuts on facade and dao methods. Code: However, I ...

86. Spring JDBC transaction Mangement problem    forum.springsource.org

Spring JDBC transaction Mangement problem Hi All, Can any one of you help me regarding the spring JDBC transaction problem. The details are as below, I have 4 spring Bean XMLs(In ...