Results 1 to 2 of 2

Thread: Transaction issue in Facade + Service Layer

  1. #1

    Default Transaction issue in Facade + Service Layer

    In my application my sturcture is as:

    JSF Managed bean -->Business Delegate --> Service layer -->DAO Layer -->Database
    but to execute a complex business logic i have Facade and call squence become:

    JSF Managed bean -->Facade --> Service layer -->DAO Layer -->Database


    All of my service classes are marked Transactional as:
    Code:
     
    @Component
    @Transactional
    public class DesignerServiceImp implements DesignerService{
    The method in my Facade has complex business rules and then update multiple tables thorugh calls to Servie methods. So i marked method in facade as @Transactional.

    Now i have mix of Transactioanl at Service Layer and Facade level. My Facade has service injected. The Transaction started at Facade method is not propagted to Service methods so RollBack is not performed in case of error.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    Is your Facade a spring bean and is it in the same context as your transactional advice?
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •