This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Software Teaming: A Mob Programming, Whole-Team Approach and have Woody Zuill and Kevin Meadows on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Spring JDBC Transaction vs Connection ?

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
someone please clear my doubt ..

please first look into my 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



the connection which i get is

org.hsqldb.jdbc.jdbcConnection@6bd26bd2



i hope i have did mistake, but i don't know where i did it. please help me

 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i found the solution.

i am right both are different connection.

NOTE: if we need spring transaction then we have to use spring dao.i mean we can't use spring transaction API alone
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
to get the connection which is enabled by spring

DataSourceUtils.getConnection(getDataSource());
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jayaraj Jaganathan wrote:
NOTE: if we need spring transaction then we have to use spring dao.i mean we can't use spring transaction API alone



i am wrong we can use spring transaction alone
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic