Announcement Announcement Module
Collapse
No announcement yet.
A design question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • A design question

    While using spring MVC, we always try to maintain the (controller - > service -> dao) hierarchy. In spring webflow for an action state we can call method of any POJO. My question is, say I have a scenario where I need a boolean result from a dao method and nothing more than that. In this case, should I need to maintain the service -> dao hierarchy (where actually nothing is done in service method rather than calling the appropriate dao method and returning it's result) or it it OK to call the dao method directly?

  • #2
    In this case, should I need to maintain the service -> dao hierarchy (where actually nothing is done in service method rather than calling the appropriate dao method and returning it's result) or it it OK to call the dao method directly
    I would suggest you keep the service method. Keep in mind that it also serves as a transaction demarcation point!

    Erwin

    Comment

    Working...
    X