This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help me understand this piece of code  RSS feed

 
Girish Vasmatkar
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

I'm new to spring and working on a project involving spring. We are building the app from scratch and I have been given the Job of handling spring related stuff.

I've created daos and all that stuff and now working on the service layer. During my search, I found a sample application and was looking in the code of the application to see how the things are done in spring. However, I was stuck at the following code snippet in the service bean file:




I feel lost when I see all those PROPAGATION_REQUIRED and the the target value of name parameter.

I have a feature in my app for the user to search. So, I wanted to write a SearchService class. Should I blindly follow what's been done in the above mentioned code?
I do feel that I get a better understanding of the code above before going ahead.

Thanks!!!
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the things with PROPAGATION_REQUIRED in the abstractService (and the other services specifying parent="abstractService" ) are to support transactions. I doubt you'll need transaction support to do search, so you won't need to specify any of this.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!