Win a copy of The Business Blockchain this week in the Cloud forum!
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic