• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

How do I know if transaction is configured successfully?

 
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using spring 2.5.6 and have strictly followed the example given in documentation. but when I run the program and check the console it does not give any indication regarding transaction.

Context.xml



Boot.java



My Console output



Console output according to Spring documentation



Spring reference document : http://static.springsource.org/spring/docs/2.5.x/reference/transaction.html#transaction-declarative-first-example

Cross post : http://forum.springsource.org/showthread.php?t=102801
 
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your main() method, try catching java.lang.UnsupportedOperationException and print the stack trace as well as its message to see if you can glean any more information about the error.
 
Saurabh Pillai
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not worried about exception. I am throwing it explicitly from code. My question is , how do I know if transaction is configured properly. as my console output does not give me any indication.
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try running a test where the transaction succeeds and see that the data is written to the database. Then try a test where the transaction is supposed to roll back and see that the data is not written to the database.
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!