• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring transaction management with listeners

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
newbiw on Spring and need to use declarative transaction management.

All examples i have seen so far does something like:
1. A TransactionManager service.
2. This defines the db operation methods with @Transaciton annotation's
3. A client invokes these methods and voila everything is done.

but these examples does not help me understand how its is generic... as there are set of defined operations which a client has to invoke and have the task done.
Secondly, for every new db operations again the full implementation needs to be done.
and so on.. this is the fist time i am handling spring.


Here is my understanding of what i have been asked to achieve:

1. A global transactionManager service, which will be using using JTA.
2. There needs to be some sort of TransactionListener service which will listen for (as the name suggests )
3. All other business logic classes will just declare there methods as @Transactional.
4. So somehow magifically everything inside these business classes should be in a transaction and everything like begin/commit/rollback gets managed by itself via point 1 & 2 above.

do i make sense ? if by chance yes what i asked is that even possible ?

If yes please help...
(i have tried and tried and tried again.. to read the spring documentation... but hardly anything clicks in my mind)
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Siddharth welcome to javaranch.

I'm sorry but I don't understand what you are confused about. Do you want to understand how transaction management works internally or do you want to know how to configure it?
 
Lookout! Runaway whale! Hide behind this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic