Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ajdt-dev] AspectJ newbie

Hi.

A very comprehensive implementation of transactions in AJ is described here:

http://doi.acm.org/10.1145/1119655.1119683

Hope that helps,
Eric

--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada 

> -----Original Message-----
> From: ajdt-dev-bounces@xxxxxxxxxxx 
> [mailto:ajdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Kaul, Dimple
> Sent: Monday, June 19, 2006 7:51 PM
> To: ajdt-dev@xxxxxxxxxxx
> Subject: [ajdt-dev] AspectJ newbie
> 
> 
> Hi All,
> 
> I have recently joined this group.
> 
> I know it is a good idea to use AOP for functionalities which are
> scattered all over the code. I have a project in which 
> transaction control
> is to be handled using AspectJ. In this project transaction 
> control has
> been done at most places but at some places it is not done. 
> Is it a good
> idea to use AspectJ for transaction control? And if yes how 
> will it affect
> already existing transaction control functionality? Should I 
> manually go
> into code and remove already existing transaction control 
> code ...but then
> the purpose of AOP is lost.
> 
> 
> 
> I got this example from internet :
> 
> 
> 
> aspect DatabaseAspect {
> 
> 
> 
>   pointcut transactionalMethods ():
> 
>      execution (/* pattern for transactional methods */) ;
> 
>   before(): transactionalMethods () {
> 
>     initialiseDatabase() ;
> 
>   }
> 
>   after() returning: transactionalMethods() {
> 
>     commitTransaction() ;
> 
>   }
> 
>   after() throwing: transactionalMethods() {
> 
>     rollbackTransaction() ;
> 
>   }
> 
> }
> 
> 
> Help is appreciated.
> 
> Thanks,
> 
> Dimple
> 
> 
> 
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
> 


Back to the top