File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Help me understand this piece of code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Help me understand this piece of code" Watch "Help me understand this piece of code" New topic

Help me understand this piece of code

Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 201
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.

Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

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.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: Help me understand this piece of code
It's not a secret anymore!