The moose likes Spring and the fly likes Transaction.REQUIRES_NEW Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Transaction.REQUIRES_NEW" Watch "Transaction.REQUIRES_NEW" New topic
Author

Transaction.REQUIRES_NEW

Csabba Csurja
Greenhorn

Joined: Jan 12, 2012
Posts: 12
Hello Guys,

I have a very simple example for testing the transaction feature in Spring 3.
There is a Requires_new propagation level, and I would expect that this transaction as a whole will be rolled back completely because expiration flag is after second run was changed to false (-> throws UnsupportedOperationException error)
But the john, mike are commited and shaik is not...




snippet from applictationContext.xml


Intentionally, I tried to keep this example as simple as possible, What did I wrong?

Thanks in advance,
Csaba

Sam Mercs
Ranch Hand

Joined: Feb 08, 2009
Posts: 539

How are you trying this example out? Where and what does your main method look like?


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Csabba Csurja
Greenhorn

Joined: Jan 12, 2012
Posts: 12
Hi Sam,

there is nothing special, which looks like this:



thanks,
Csaba
Sam Mercs
Ranch Hand

Joined: Feb 08, 2009
Posts: 539

You configuration looks ok to me and nothing strike me as particularly missing. I'll have to pass up on this one, no clue why its not working!
 
 
subject: Transaction.REQUIRES_NEW
 
Threads others viewed
Spring 2.5 - Rolling back first method, when the second method throws Runtime ex
Problem with Transaction Management
createSQLQuery in Spring
Exception on Save operation with Spring annotation
Transaction is not rolling back in case of exception
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture