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
Post a Comment