[ http://galaxy.andromda.org:8080/jira/browse/SPRING-35?page=history ]
     
Work on SPRING-35 started by Chad Brandon

> Make entityTransactionInterceptor optional on DAOs
> --------------------------------------------------
>
>          Key: SPRING-35
>          URL: http://galaxy.andromda.org:8080/jira/browse/SPRING-35
>      Project: Spring Cartridge
>         Type: Improvement
>  Environment: AndroMDA RC1
>     Reporter: Johnny Macchione
>     Assignee: Chad Brandon
>     Priority: Minor

>
> When not using session EJBs, the Spring cartridge generates an 
> applicationContext.xml file contains the following relevant beans:
> - 'transactionManager'
> (org.springframework.orm.hibernate.HibernateTransactionManager).
> - 'hibernateInterceptor'
> (org.springframework.orm.hibernate.HibernateInterceptor)
> - 'entityTransactionInterceptor'
> (org.springframework.transaction.interceptor.TransactionInterceptor)
> - 'serviceTransactionInterceptor'
> (org.springframework.transaction.interceptor.TransactionInterceptor)
> DAOs are proxied with the 'entityTransactionInterceptor'. This allows them to 
> be tested alone.
> But it should be possible to disable the generation of the 
> 'entityTransactionInterceptor' on DAOs, for the following reasons:
> - proxies incur a (slight) overhead that might not be justified in a 
> production environment;
> - transaction boundaries should be demarcated on business faÃades only 
> (service beans).
> - DAOs should never be exposed to clients (e.g. the web tier); they should 
> always be invoked through the business layer.
> On the other hand, service beans are correctly proxied with the
> 'serviceTransactionInterceptor', but also with a 'hibernateInterceptor' to 
> enable the use of Hibernate's lazy loading feature in business objects.
> But it should be possible to disable de generation of the 
> 'hibernateInterceptor' on services for the following reasons:
> - a 'hibernateInterceptor' only makes sense when using a DAO implemented
> with Hibernate; but a service object might use DAOs implemented in some other 
> technology or might not even use DAOs to perform its business logic;
> - not everybody wants to use Hibernate's lazy-loading feature: DAOs might 
> explicitly initialize the required lazy associations for a given use case.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://galaxy.andromda.org:8080/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to