aspose file tools
The moose likes Spring and the fly likes How do I know if transaction is configured successfully? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "How do I know if transaction is configured successfully?" Watch "How do I know if transaction is configured successfully?" New topic
Author

How do I know if transaction is configured successfully?

Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 449
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
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
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

Joined: Sep 12, 2008
Posts: 449
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

Joined: Jun 01, 2010
Posts: 618
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How do I know if transaction is configured successfully?
 
Similar Threads
Transaction failure crashes program
Transaction is not rolling back in case of exception
Spring Transaction using AOP in EJB Project
Spring JDBC Transaction vs Connection ?
Spring AOP HELP needed