File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me understand this piece of code

 
Girish Vasmatkar
Ranch Hand
Posts: 201
  • 0
  • 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
  • 0
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic