• Post Reply Bookmark Topic Watch Topic
  • New Topic

Asynchronous transactions

 
Prince Sewani
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm working on a java webservice(spring-jaxws), have a scenario where in two threads need to have their own transactional bounds un-related to each other to execute a set of statements in parallel, this application uses jdbc template and I've tried a bunch of things using Spring's @Transactional annotation. Have set the transactionSynchronization property to Never and also read here that if the @transactional is on a method in the same class as the initial thread it won't be activated/considered since spring's transaction management is proxy based. Not looking to make use of nested transactions, and propagation_required_new doesn't seem to work? Any suggestions? Been hitting my head against it for quite a while now. Can't post the code for confidentiality reasons but the description above is sufficient enough to explain my problem I believe(at least for those who've worked on Spring based transactiona management in a multi-threaded environment). Thanks in advance. Any help is much appreciated.
 
Prince Sewani
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, any help on this will be much appreciated.
 
Prince Sewani
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just learnt that the proxies generated didn't have the additional transaction configs, explicitly added programmatic transaction bounds which turned the code to behave as expected.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!