• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring Hibernate Persistence problem !!!!

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Just to summarize. I am using Myeclipse IDE, and am building the sample application using both spring and hibernate. See this link which has the sample app.

http://www.myeclipseide.com/documentation/quickstarts/hibernateandspring/

I do everything step by step as is give here. However when i store something to the database ... it does not get stored and it seems that there is some kind of a transaction rollback. I can say this because if i store something beforehand, I get a primary key violation if i try to store throught spring hibernate. So i know my sql statement is atleast hitting the database.

Does anyone know or can send me a small snippet of code showing how can i commit a transaction with spring explicitly.

Many thanks for any help or input. This is really driving me insane.

Nise
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use transaction.commit() after your insert query
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic