hibernate - where to place Transactional Spring annotation , in which layer? -



hibernate - where to place Transactional Spring annotation , in which layer? -

i have uncertainty in placing spring annotation, in layer? these 2 cases:

case : placing @transactional in dao layer

case : placing @transactional in service layer?

i using spring only, not springmvc.

you want services @transactional. if daos transactional, , phone call different daos in each service, have multiple tansaction, not want. create service calls @transactional, , dao calls within methods participate in transaction method.

refer link more details

spring hibernate spring-mvc transactional

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -