Aspect-Oriented Software Development with Java
Aspect Components
Renaud Pawlak, Lionel Seinturier, Laurence Duchien, Laurent Martelli,
Fabrice Legond-Aubry, G´
erard Florin
To cite this version:
Renaud Pawlak, Lionel Seinturier, Laurence Duchien, Laurent Martelli, Fabrice Legond-Aubry,
et al.. Aspect-Oriented Software Development with Java Aspect Components. Mehmet
Ak-sit, Siobhan Clarke, Tzilla Elrad, Robert E Filman. Aspect-Oriented Software Development,
Addison-Wesley, 2004, 0-321-21976-7. <inria-00489501>
HAL Id: inria-00489501
https://hal.inria.fr/inria-00489501
Submitted on 5 Jun 2010
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of
sci-entific research documents, whether they are
pub-lished or not.
The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est
destin´
ee au d´
epˆ
ot et `
a la diffusion de documents
scientifiques de niveau recherche, publi´
es ou non,
´
emanant des ´
etablissements d’enseignement et de
recherche fran¸
cais ou ´
etrangers, des laboratoires
publics ou priv´
es.
Renaud Pawlak (1) , Lionel Seinturier (2) , Lauren e Du hien (3) LaurentMartelli (4) , Fabri e Legond-Aubry (2) , GérardFlorin (1) (1)
CNAM, Lab. CEDRIC, 292 rue Saint Martin, 75141Paris edex 03, Fran e (2)
Univ. Paris 6,Lab. LIP6, 4 pla e Jussieu,75252 Paris edex 05 (3)
Univ. Lille1, Lab. LIFL,Bâtiment M3,59655 Villeneuved'As q, Fran e (4)
AOPSYS, 5 rue Brown Séquard, 75015 Paris, Fran e
31st O tober 2002
Abstra t
Inthe last four years,our resear hproje t dealtwith separationof on erns for distributed programming environmentsandappli ations. Thisresear heortledtotheimplementationoftheJavaAspe tComponents (JAC) framework for aspe t-orientedprogramming (AOP)inJava. Amongthe manyrequirementsfor distri-bution,exibility andadaptability playastringentrole. Thehighvariabilityofexe uting onditions(interms of resour es, servers availability, faults, ...) also brings the needfor powerful programming paradigms. This led usto develop adynami modelofAOP whi h,unlikestati ally ompiledapproa hes, allows to on-the-y deploy and undeploy aspe ts ontop of running appli ations. This model omes with anUML notationand animplementation. AnIDE isprovidedwith JACtosupportall thedevelopmentstepsof anaspe toriented appli ation, fromitsdesign,toitsimplementation,andtoitsdeployment.
1 Introdu tion
In order to handle the omplexity of software development, separation of on erns [Par72℄[Dij76℄ distinguishes between fun tional andnon fun tionalrequirementsthat needsto beaddressed in an appli ation. It is assumed that the e ient handling of this issue is a key to software quality and reuse. Nevertheless, one should noti e that the frontierbetweenfun tional and non-fun tional properties may be movingdepending on the appli ation eld: features (e.g. time onstraints) maybepartofthe fun tionalrequirementsinsomedomains (e.g. real-time ontrol),andofnon-fun tionalonesinotherdomains(e.g. wordpro essing). Obje t-orientedprogramming(OOP) isapowerfultooltohandlefun tionalde omposition. Still,non-fun tionalpropertiesarespe i inthesensethat they an notalwaysbede omposed leanly from fun tional ones: mostof the time they anonlybe superposed totheoriginalfun tionalde omposition. Thisleadstothe odetanglingphenomenonwherea on erniss attered intomanydierentlo ations(i.e. pie esoffun tional ode),makingitsdevelopment,itsmaintenan e,anditsreuse di ult. Thisphenomenonhasbeenisolatedin[KLM
+
97℄andledtothedevelopmentofanewprogrammingstyle alled aspe t-orientedprogramming(AOP). Sin e then, several tools and ompilers havebeendeveloped (among them Aspe tJ [KHH
+
01℄), and loselyrelated te hniques havealso been improved(among themHyper/J[OT01℄ and omposition lters[BA01℄).
This arti le presents our programming environment alled Java Aspe t Components [JAC℄. The two main requirementsof this framework are to support dynami ity and distribution. Nevertheless, JAC is also ageneral purposeAOPenvironment. Asthis,it omeswithaprogrammingmodel,adesignnotationandanAPI.Previous papers des ribed the programmingmodel [PSDF01a℄ of JAC, itsaspe t omposition me hanism [PSDF01b℄, the rstelementsof ourUML notation[PDF
+
02℄, andthear hite turefordistribution[PDF +
℄. This arti lesumsup themainfeaturesofJACanddes ribesin detailsourUMLnotation.
Se tion 2 introdu es the programming model of JAC. The UML design notation is des ribed in se tion 3. Se tion 4reports on the ar hite ture of JAC for distribution support. Implementation details and performan e
te hnologies. Finally,se tion7 on ludes thisarti le.
2 JAC framework & programming model
The JAC framework is basedon the notionof ontainers. Mu h likein other omponent frameworks (e.g. EJB [Sun ℄),a ontainerisahostforsoftwareentities. JAC ontainershostbothbusiness omponent,andnonfun tional omponent( alledaspe t omponent). Aswewillseelaterinse tion5,whenworkingwith entralizedenvironment, the ontainerissimplya ustomizedJava lassloaderthatperformsbyte odeadaptationstogluethebusinessand aspe t omponentstogether. Wheneveradistribution on ernappearin theappli ation,these ontainersbe ome remotelya essible(eitherwithRMI orCORBA).
Programmingmodel
JAC identies three dierent roles involved in the development of an aspe t-oriented appli ation. Appli ation programmer: thisroleis on ernedwiththe orebusinessoftheappli ation. S/heimplementsthesoftwareentities oming from the fun tional de omposition of the problem. Aspe t programmer: this role is on erned with the implementationofnonfun tionalservi es. Uptothisstage,theseservi esareindependentfromtheonesdenedby appli ationprogrammers. Softwareintegrator: thisroleputsappli ationandaspe t odetogether. Twoimportant tasksare under theresponsibility ofthis role: point ut denitions andaspe t omposition. Forthese three roles, theprogrammingmodelofJACprovidesthefollowingsoftwareartifa ts:
1. Baseprogram: this isthesetofJavaobje tsthat implementsthe orefun tionalitiesofappli ations. These are regularJavaobje ts. Thisset ofobje tsisself su ientand anberun onaJVM(hen e, withoutany aspe t).
2. Aspe t omponents: su h a omponentimplementsanonfun tional on ernthatwill lateron,bewovenon abaseprogram. An aspe t omponentdenesa ross utpoli y(i.e. themethodsofthebaseprogramwhose semanti s is modied by the non fun tional on ern) and someaspe t methods (advi es in Aspe tJ) that denethesemanti almodi ations. Aspe tmethodsmaywrap(exe utebeforeand/orafter ode),repla eor extendthesemanti sof abasemethod.
3 Design notation
This se tion des ribes our UML prole to support the design of aspe t with JAC. Stereotypes are proposed to qualify lassesimplementinganonfun tional on ern(3)andto qualifypoint utrelations3.2. Anexampleusing thesetwo on eptisgivenin se tion3.3. Se tion3.4goesastepfurtheranddrawssomesimilaritiesbetweenAOP andtheuse-providerelationship.
3.1 Aspe t omponent lasses
Aspe t Componentsare the entral pointof our AO framework. They are theimplementation units that dene extra hara teristi sthat ross uta set of base obje ts. The key hara teristi sof JACis that the base obje ts that areinvolvedin a ross utarenotne essarilylo atedonasingle ontainer. Theyaredenedin lasses alled Aspe tComponent lasses(AC- lassesforshort).
An AC- lass is tagged with the aspe t stereotype. It ontains attributes and methods whose semanti s dier from regular methods. AC-methods are meant to extend the semanti s of regular lasses. The extension is performed on well dened implementation points so that these points a tually use aspe t-servi es in order to integrate new on erns (e.g. a base lass an be made to use a Ca he interfa e if the aspe t implements some a hing on ern).
Ea h AC-method denessome odeand extentsthesemanti sof somebase methods a ordingto amodality denedbyastereotype. TheexistingstereotypesforanAC-methodm follow.
ofthebaseprogram.
after m(...): theAC-method m isexe utedafteragivenpointof therenedprogram.
aroundm(...): apartoftheAC-methodm isexe utedbeforeandanotherpartisexe utedafter agiven pointoftherenedprogram(thesetwoparts aredenedwithintheimplementationofm).
repla e m(...): the AC-method m modies a given point of the extended program implementation by repla ingitbytheimplementationof m.
rolem(...): theAC-methodm anbeinvokedontheobje tsthatareextendedbytheAC- lass;moreover, theAC-methodm an a esstheextended lassattributesandtheaspe t- lassattributes.
Forinstan e,gure1showsthe a hingAC- lassCa hing (withtheaspe tstereotype). Asitsnamesuggests it,thisAC- lassprovidesa a hingextensionme hanism. Thejobofstoringandretrievingvaluesfromthe a heis delegatedtotheCa he (regular) lass. ThewhenWritemethodoftheAC- lassCa hingistaggedwiththeafter stereotype. It will beexe uted after any base method asso iatedwith whenWrite in the point ut denition (see belowse tion3.2). ThewhenRead methodis tagged witharound. Itwill beexe uted before and aftersome basemethods.
+ <<after>> whenWrite()
<<aspect>>
Caching
Cache
+ getValue(): Object
+ setValue(Object)
+ invalidate()
+ <<around>> whenRead()
Figure1: Denition ofa a hing on ernwithanAC- lass.
3.2 Point uts denition
A point ut relation links an AC-method belonging to an AC- lass to aset of elements of abase program. The granularityoftheinvolvedelementsisthemethod: point utsinJAC annotgodeeperthanmethodstomodifythe base programsemanti s(e.g. we an notintrospe tmethodsbodiesto extendsomeparti ular odeinstru tions). Several arguments justify this feature. Firstly, for performan e reasons, reifying the whole ode stru ture hasa ost whi h ould not be bearable for real-lifeappli ations (rst experimentswith a fully ree tive ompilersu h asOpenJava[Tat99℄ taughtusthat). Se ondly, extendingthe semanti sofanappli ationrequires before that,to understand itsoriginalsemanti s(we annotextend somethingthat is not learlystated). Most ofthetime this originalsemanti sisdenedthroughanAPI,e.g. throughmethods. Sobasemethodsaredenitivelythebestpla e toperformsomesemanti alextensions.
Two levelsof point ut denition exist with JAC:either the point ut isdened onaper- lass basis,ora per-instan ebasis.
Class levelpoint uts
Thislevelisverymu hsimilartotheonefoundinAspe tJ.Alltheinstan esofthe lassesinvolvedinthepoint ut areextendedbytheaspe t omponent. Inthis ase,apoint utrelationisanorientedasso iationfromanAC- lass towardsoneorseveral lasses. Theasso iationisstereotypedwithpoint ut. Theroleshavespe ialsemanti s: they mention whi h methods of the lient lass are extended and by whi h AC-methods. The semanti s of the elementsmentionedingure2follows:
apoint utrelationpmustgofromanAC- lassAtoa lassC (ifseveral lassesareinvolvedinthepoint ut, severallinksaredrawnbetweentheAC- lassandthe lasses),
<<aspect>>
A
<<pointcut>>
r2
c2
p
tag
C
r1
c1
Figure2: Thepoint utasso iation: relatingaspe tsto lasses.
Keywords Semanti s
ALL allthemethods
STATICS allthestati methods
CONSTRUCTORS allthe onstru tors
MODIFIERS allthemethodsthatmodifytheobje t'sstate, i.e. thatmodifyatleastoneoftheelds ACCESSORS allthemethodsthatread theobje t'sstate GETTERS[(...)℄ thegetters
SETTERS[(...)℄ thesetters
ADDERS[(...)℄ themethodsthataddanobje ttoa olle tion REMOVERS[(...)℄ the methods that remove an obje t to a
ol-le tion
FIELDGETTERS allthegettersforprimitiveelds FIELDSETTERS allthesettersforprimitiveelds REFGETTERS allthereferen egetters
REFSETTERS allthereferen esetters COLGETTERS allthe olle tiongetters COLSETTERS allthe olle tionsetters
Table2: Keywordsallowedinpoint ut expressions.
+ <<after>> whenWrite()
<<aspect>>
Caching
whenRead
whenWrite
0−1
0−1
1
1
Cache
+ getValue(): Object
+ setValue(Object)
+ invalidate()
<<pointcut>>
<<pointcut>>
?GETTERS
?SETTERS
Server
p1
p2
+ <<around>> whenRead()
is0-1),
ardinality 2 isthenumberofmembersofC that anbeinrelationwithoneinstan eofA(defaultis*for all),
role r1 is the name of an AC-method dened in A that is applied at ea h base program point denoted by role r2,
roler2 denesabaseprogram ross uti.e. asetofjoinpoints. r2 isalogi alexpression(withAND,ORand NOToperators)whereea htermis oftheform qualiermethodExpression.
Twomainsqualiersareused: ? whi hdesignatedamethodexe utionpoint,and! whi hdesignateda method invo ationpoint.
methodExpression is either afully-dened methodprototype(e.g. get():int), orapartially-dened one with GNU-likeregularexpressions (e.g. get.*(.*):int mat hesall methodswhose namestarts withget, returnaninteger,andtakeanyparameters),oranexpressionbasedonthekeyworddened in table2. Forinstan e, GETTERS(a,b)mat hesthegettermethods foreldsaandb. Likein omponent frame-workssu has JavaBeans, naming onventionsare assumedonmethod names: getter/settershould be name get/set followed by the eld name (starting in upper ase). Adders/removersshould be named add/removeand takean obje tasan uniqueparameter. Ea h timea new lass is loaded in the JAC framework,someintrospe tionandbyte odeanalysis areperformed. A meta-model ofthe lassis on-stru tedonthey(inadedi atedaspe t alledRTTIforRunTimeTypeInformation)withannotations that enable to a hievethe semanti sdened in table 2. Forinstan e, ea h method byte ode is parsed to determine whethersome eldsare modied ornot. Ifso, themethod is taggedasaMODIFIER in the RTTI aspe t. As the pro ess of analyzing the byte ode of many lasses an be time onsuming, the lasses whi h areneverextendedbyanaspe t (i.e. that aresimply usedby baseobje tsoraspe t omponents), anbeex ludedfromthis analysisphase.
as any UML model element, thepoint ut relation anbetagged (tag) to express extrasemanti sthat an beused when implementing themodel towardsa on rete platform; somesemanti sexamplesare shownin further se tions.
Figure 3showstwopoint ut relationsthat implementa a hingaspe tbyusing theAC- lassdened in gure1. Thisaspe tdiagrammustbereadasfollows.
After theexe ution ofanysetter(a method that hangestheobje tstate) of aServer obje t, theprogram mustexe utethewhenWrite AC-method.
Around(i.e. beforeandafter) theexe utionof anygetter(a methodthat readstheobje tstate) ofaserver obje t,theprogrammustexe utethewhenRead AC-method.
Instan e levelpoint uts
Besidesthepreviouslydes ribedme hanism,JACalsoallowsdeveloperstodenepoint utsonaper-instan ebasis. Theideahereistosele tivelyextendsthesemanti s ofsomeinstan esofa lass. Therationaleisthat inahighly dynami distributed environment,someserverobje tsmayneedto ustomized(e.g. repli ated),while othersmay needtostayunmodiedeveniftheybelongto thesame lass.
Oneofthedi ultyisthat, ontraryto lassesthatarestraightforwardlynamed,obje tsla kanydire tnaming s hemeinJava. ThesolutiontakeninJACistolettheframeworkatta hanuniquenametoea h reatedinstan e: the name is the on atenation of the lass name in lower ase and of an auto-in remented integer (e.g. server0 designates the rst reatedinstan e of lass Server). The framework provides anAPI to retrieveobje tsbased on theirname. Thisapproa h is atrade-o between generalityand simpli ity: it is learto us that this s heme is usableonly ifthe number of reatedinstan es for ea h lass stayssmall. This s heme alsorequires the aspe t programmertohaveadeepunderstandingoftheinstan e reationpro essgoingoninthebaseprogram.
anbeextendedwithaninstan enameoraregularexpressiononinstan enames. Forinstan e?SETTERS|server0 designatesthe exe utionpointsof thesetter methods of instan e server0, ?GETTERS|server[1-3℄ designatesthe exe utionpointsofthegettermethodsofinstan esserver1,server2 andserver3.
Whendistribution omesintoplay,point utdenitions analsobelteredbasedon ontainernames(a ontainer namebeingaRMIorCORBAURLdependingonthe hosen ommuni ationproto olbetweenJACremote ontain-ers). Theideaistoletdesignersexpressbehaviorsthatwillbedependentonthe ontextintowhi h omponentsare deployed. Forinstan e,onemaywanttoinstallanauthenti ationaspe tonlyonspe i riti alhosts,whereasthe restoftheappli ationdeployedonotherhostsstaysunmodied,oronemayneedtoinstallsomeloggingaspe tonly onagiven ontainer. Toallowthis,point ut expressions anbeextendedwith ontainernamesorregular expres-sionson ontainernames. Mergedwiththepreviousextensionforinstan enames,thisleadstoa ompletes heme wherepoint ut expressionsareoftheform: qualier methodExpression|instan eExpression| ontainerExpression with instan eExpression and ontainerExpression beingoptional. For instan e ?ACCESSORS||rmi://myHost/s1 designatesthea essorsexe utionpointsofinstan eslo atedonJAC ontainerrmi://myHost/s1.
3.3 A rst simple example
Thisse tionillustratestheprogrammingmodelofJACbasedontheCa hing aspe tofgure3. Thedetailsofthe APIandsometutorials an befoundontheJACwebsite[JAC℄.
Figure4givesthe odeoftheCa hing aspe t. Anaspe t omponentmustextendtheja . ore.Aspe tComponent lass. Amongotherthingsthis lassprovidesapoint ut methodthatletprogrammersexpressapoint ut. The pa-rametersare: thebase lassthispoint utdesignates,thequaliermethodExpressionasastring,the lass ontaining theAC-method,theAC-methodinvolvedinthepoint ut. Heretwosu hpoint utsaredened. Additionalpoint ut methodsareavailablewheninstan eExpression and ontainerExpression aretobeasso iatedtothepoint ut.
import ja . ore.Aspe tComponent; import ja . ore.Wrapper;
import ja . ore.Intera tion;
publi lass Ca hing extends Aspe tComponent { publi Ca hing() {
point ut("Server","?SETTERS",Ca hingWrapper. lass,"whenWrite"); point ut("Server","?GETTERS",Ca hingWrapper. lass,"whenRead"); }
publi lass Ca hingWrapper extends Wrapper { private Ca he a he = new Ca he();
publi void whenWrite( Intera tion i ) { pro eed();
Obje t value = i.arg[0℄; a he.setValue(value); }
publi Obje t whenRead( Intera tion i ) { Obje t value = a he.getValue(); if ( value == null )
value = pro eed(); a he.setValue(value); return value;
} } }
prototypeismandatoryforallAC-methods: theya eptonlyoneparameterthatisaja . ore.Intera tion instan e. Theymayreturnanyparameters. Therationalebehindthis onstraintisthatAC-methodsareup alledbytheJAC frameworkwhenevera alltothebasemethodtheyextendisissuedorexe uted(i.e. wheneverthe allmat hesthe point ut expression). An Intera tion obje ti provides dataabout the urrent all: argumentsof the all(in the arg array),areferen eto thebaseobje t(i.wrappee),and somemethods tostoreandretrieve ontextparameters (forinstan e,parametersthat an beaddedbyanAC-methodonthe allerside,andthat anlateronretrieveon there eiversidebyanotherAC-method).
3.4 Extended design notation for distribution
The group paradigm
Intheprevious a hingexample,thesemanti smodi ationintrodu edbythe a hing on ernintotheappli ation is quite symmetri . Con retely, it means that all the obje tsthat are modiedto implement a hes (the Server obje ts) anbeseenasmodiedbythe sameabstra t transformationrule. However,onemaywantto weavethe Ca hing aspe ttodierent lasses. Thus,anotherdesignation me hanismisneededto expressthefa t that aset ofwell-denedobje tsimplementsthesame on ern.
Thisneedforanewkindofstru turedelementsbringsustofo usonthegroupnotion. Ifwelookatthegroup notionvery arefully, we annoti e thatit istightlylinkedto aspe ts. Indeed, ontrarytoa lassthat abstra tly representsaset ofinstan esrealizingthesamefun tional hara teristi s,agroupis, inourdenition,anabstra t representationofasetofinstan esthatdonotne essaryhavehomogeneousfun tionaltypesbut thatarelogi ally groupedtogetherbe ausetheyimplementthesameservi e(servergroups)orusethesameone( lientgroups).
Figure 5representstheappli ationofthe a hingaspe tonagroupofserversthatimplementstheserverpart ofasimple lient/serverappli ation. Weuseaninstan ediagramsothatitbe omesobviousthatthegrouponthe topofthegureisanon-uniform setofinstan es (thethree instan esa,b, and belongto threedierent lasses A, B and C). As shown on this gure, the appli ation of the a hing aspe t reates anew group that ontains instan es of a Ca he lass that provides the a hing fun tionality. In other words,we an say that these Ca he instan esbelongtoaservergroupthatprovidesa a hingfun tionalityforthe lientgroupformedbythea,b,and servers.
A group-based denitionof aspe ts
Itappearsthattheintrodu tionofthe a hing on ernwithintheoriginal lient/serverappli ationisabstra tlydone bytheuseof theservi estheCa he groupinterfa eprovidesto theserversgroup. This anbeeasily represented in UMLbyusingtheuserelationasrepresentedingure6. Inthegeneral ase,implementinganew on ern mayrequirethe useof several interfa es. Inthese ases, several lients anbe related to several serversthrough someuserelations.
Finally,asimplebut su ientdenition ofanaspe twithinthis ontextisthefollowing.
Denition: an aspe t is the implementation of one ormany use-provide relationship(s) between one ormany lientgroup(s)and oneormanyservergroups.
The model of gure6 learly bringsup ause-providerelationshipbetweena lient-group(the servers), anda servergroup(the a hes)that denesthe grouplevelservi esgetValue(),setValue(Obje t) and invalidate(). This relationshipimplementationrequirestheappli ationtomodifythe lientgroupmemberobje tsimplementationto introdu ethe a hing on ernwithintheappli ation. Ifthis on ernimplementationismodularized(i.e. ifthe ode that implements the a hing on ern introdu tion is lo ally dened), then the implementation te hnique follows theAOPguidelinesandwe an alltheobtainedmoduleanaspe t.
At theanalysis level,to express the fa t that ause-providerelationshipis implementedin anaspe t-oriented fashion, the appli ation designer an add a tagged value aspe t:aspe tName to all the use relationships implementedbytheaspe t alledaspe tName (seegure6).
Thus group-oriented modeling allowsthe designer to expli itin a omprehensivewaywhat parts of the (dis-tributed) appli ation areaspe tsand what parts are not. Infa t, for ea h modeled groupleveluse-provide rela-tionship,aspe t-orientedte hniques anbeusedto separate on ernswithin thenalimplementation.
a:A
a:Cache
a:A
a group
client:Client
b:B
c:C
b:Cache
c:Cache
client:Client
b:B
c:C
application of the caching aspect
Figure 5: Relatingaspe tstogroup.
b:B
c:C
a:A
+ getValue(): Object
+ invalidate()
+ setValue(Object)
Server
Cache
aspect: caching
<<use>>
s/he anaskher/himselfifanaspe twouldbewellsuitedinthis ase. Despitetheuseofanaspe tornotismainly relatedtothedesignerexperien eand hoi es,we angivesome luesonwhenanaspe twillbebettersuitedthan a lassi aldesign.
The lientgroupis heterogenous: it meansthat theuse oftheserverservi esare spreadalloverthe lient-groupmember lasses. Thisisbyessen ea ross uting on ernandsomeextradesignisne essaryto leanly modularizealltheinvolveddependen ies(forinstan e, we anuseinheritan ethat impliesbad omposition with other on erns or we an use some delegation related pattern whi h leads to a more omplex design model). In this ase, theuse of anaspe t angreatlysimplify theprogrammer's task andwill ensuregood maintenabilityandevolutivityofthenalimplementation, evenifsome on ernsareaddedafterwards.
Severalhomogeneous lientgroupsusethesameservergroup: thisis exa tlythesamesituation that above sin eseveralhomogeneousgroups anbemodeledintooneheterogenousgroup.
Several lientgroupsuseseveralservergroupsbutitseemsthatthenalpurposeoftheseuse-providerelations entersintoonesame on ernfor thenal appli ation: thisis amore ontextual hoi e that depends onthe knowledgeofthemodeleddomain.
Figuresumsupthenotionintrodu edinthisse tionandproposesaUMLmetamodelwhereadditionsintrodu ed byJACaredrawnwithboldlines.
orientation:int
startCardinality:String
startRole:String
endCardinality:String
endRole:String
RoledLink
Link
isAggregation:boolean
RelationLink
packagePath:String
Type
TypedElement
Instance
Member
Field
body:String
Method
Constructor
Parameter
InheritanceLink
name:String
description:String
ModelElement
start
end
endingLinks
*
PointcutLink
methodPCD:String
hostPCD:String
aspectRole:String
Aspect
Class
superClass
*
relationLinks
pointcutLinks
*
*
fields
methods
*
*
parameters
*
aspectMethods
AspectMethod
classPCD:String
objectPCD:String
Group
Figure7: TheUMLextensionmeta-model.
4 JAC ar hite ture for distribution
4.1 Aspe ts deployment and distribution
This se tion sums upthe features of the ar hite ture set up in JACto handle distribution. This ar hite ture is alledAODA(Aspe t OrientedDistributedAr hite ture)andisdes ribedinmoredetails in[PDF
+ ℄.
naturaland onsistent ohabitationbetweendistributionandaspe ts. Todothis,theAODAprovides orefeatures tosupport distributedaspe ts. Figure8showshowtheAODA managesdistributed aspe ts. Thetopofthegure is a simple appli ation omposed of a set of omponents. The middle of the gure shows the same appli ation, but extendedby asample aspe t. Finally, the bottom part depi ts the appli ation deployed by theAODA. We annoti ethat ea h ontainer ontainsalo alinstan eoftheoriginalaspe t,hen e,theaspe tisapplied onea h ontainerinthesameway. Thesetof ontainerswheretheaspe tispresentis alledanaspe t-spa esothatit an nallyberegardedasasinglebutdistributedaspe t.
AnAspect
aspectMethod()
AnAspect
aspectMethod()
AnAspect
aspectMethod()
AnAspect
aspectMethod()
a pointcut relation
instance
the distribution aspect is woven
a distributed
pointcut relation
instance
a distributed
aspect−space
the aspect−extended
program
the original
program
an aspect instance is woven
container 1
container 2
container 3
Figure8: AODA:distributed supportofaspe ts.
Ourmotivationfordistributedaspe tssupportistoallowtheaspe tprogrammertoexpress globaland de en-tralizedprogramproperties. Indeed,ithappensquiteoftenthatanon-fun tionalproperty ross utsasetofobje ts that are notlo atedon thesame ontainer. Forinstan e, when addingan authenti ation on ern,the apa ities maybe he kedonseveralserver ontainerssothatitisveryusefulto modularizealltheauthenti ationdenition inoneuniqueaspe tdenitionthatisseamlesslyapplied tothewholedistributedappli ation.
This se tionpresentsasimpleexampleofadistributed appli ationwith JAC.Readersinterestedin readingmore detailedexamplesofdistributedprogrammingwithJAC anreferto[Paw02℄where,amongotherthings,arepli ated load-balan edserverisdes ribed.
Letustakethesimpleexampleofathreenoderingwhi hprovidesasimplefun tionalitytopassatokenbetween membersofaring. Thefun tionalbaseprogramis omposedofthreeobje tsthatarethenodesofthering;Sothe rststepistodevelopsomebaselevel lasses(this odesamples analsobefoundin theJACversionthat anbe downloadedfrom[JAC℄).
publi lass Ring {
publi stati void main( String[℄ args ) { RingElement element0 = new RingElement(); RingElement element1 = new RingElement(); RingElement element2 = new RingElement(); element0.setPrevious( element2 );
element1.setPrevious( element0 ); element2.setPrevious( element1 ); element2.roundTrip( 9 );
} }
publi lass RingElement {
publi RingElement previousElement; publi RingElement() {}
publi RingElement( RingElement previousElement ) { this.previousElement = previousElement;
}
publi void setPrevious( RingElement previousElement ) { this.previousElement = previousElement;
}
publi void roundTrip( int step ) {
if( step > 0 ) previousElement.roundTrip( step-1 );
} }
For nowon, one andevelopanaspe t omponentthat will deploythe three reatedobje tson JAC ontainers, or use the existing DeploymentAC aspe t omponent provided with JAC. Ea h aspe t omponent woven to an appli ation anbe asso iated with a onguration le that gives, with a s ript-like syntax, the steps needed to ongureit. Ea hstep orrespondsto allingamethodoftheaspe t omponent. Forinstan e,thefollowings ript instru tstheinstan e ofDeploymentAC woventothepreviousbase program,to:
1. remotelyinstall(AC-methoddeploy)instan esringelement0,ringelement1,ringelement2on ontainersbound to, respe tively,theRMInamermi://host0/s0,rmi://host1/s1,rmi://host2/s2.
2. reatea lientstub(AC-method reateAsyn hronousStubsFor)forringelement0 ons2,a lientstubfor ringele-ment1 ons1,a lientstub forringelement2 ons2. Thestubdelegatesmethod allstoremoteinstan es. By this way,remote ommuni ationdetailsarehiddentoringelementobje ts.
deploy "ringelement0" "rmi://host0/s0"
reateAsyn hronousStubsFor "ringelement0" "rmi://host0/s0" "rmi://host2/s2" deploy "ringelement1" "rmi://host1/s1"
reateAsyn hronousStubsFor "ringelement1" "rmi://host1/s1" "rmi://host0/s0" deploy "ringelement2" "rmi://host2/s2"
reateAsyn hronousStubsFor "ringelement2" "rmi://host2/s2" "rmi://host1/s1"
local reference
remote reference
ringelement0
ringelement1
ringelement2
The centralized version
s0
s1
s2
aspect
actual object
deployment
The same application after the deployment aspect is woven
A
A
A
A
asynchronous stub
Figure9: Deploymentoftheringappli ation.
Adding a tra ing aspe t to the ring
Letusassumethatwenowwanttoseetheround-tripprogressiononthedierent ontainers(inotherwords,where thetokenis). Of ourse,we ouldmodifytheRingElement.roundTrip methodimplementationtoaddaprintln all sothat theround-trippingeventsareloggedelsewhere. However,thiste hniquehasmanydrawba ks.
1. Itisnotdynami : on ethetra ehandlingisthere,youmustremoveitfromthe odeand ompileitagainto freethe omponentsfromthetra emanagement.
2. It is not lean: theRingElement.roundTrip ode is lesseasy to read for an external eye sin eit handles a on ernthat isnotpurelyrelatedtothering orefun tionalities.
3. Itislessreusable: whathappensifyoureusearingprogramthathasbeenprovidedbyanotherprogrammer and thatyoudonothavethesour e ode? Whathappensifyouwantyourringreused? Doyoufurnishthe tra e-freeversionorthetra edone?
4. It isnotsafe: thetra eexampleissimple,but imaginethatyouintrodu eabugoraregressionjust be ause youwanttoaddanewte hni al on ern(forinstan e,youlogthetra esintoaleand,somewhereinallthe linesyouaddintotheinitialprogram,youforgetto at hthediskfull orpermissiondenied ex eptionsso that theprogramstops be auseofthetra esyouadded). Finalusersmaybeupsetbythis. Usinganaspe t allowsyouto modularizethetra ingme hanismsothat itismu heasierto ontrolandtoensurethat your modi ationsdonot auseanyregression.
5. It is not sosimplein adistributed environment: ifyouwant yourtra es entralized in oneuniquestorage, youmayneedto installatra ingserver... on ernsassimpleasdebuggingorloggingbe omemore omplex whentheprogramisdistributed.
Forallthesereasonsandmanyothers,youmaywanttoimplementthistra ingfeaturewithinanaspe t. When theappli ation be omesmoreand more omplex, youwill takefull advantageof this approa h. Figure 10shows thetra ingaspe tdesign. Thefollowing odeisthestraightforwardJACimplementationofthismodel.
!roundTrip
<<pointcut>>
<<pointcut>>
tokenArrived
tokenPassed
?roundTrip
<<aspect>>
Tracing
trace
Trace
RingElement
+ <<before>> tokenPassed()
+ <<before>> tokenArrived()
+ trace(String message)
Figure10: Asimpletra ingaspe tfortheringsample.
publi lass Tra ingAC extends Aspe tComponent { Tra e tra e = new Tra e();
Tra ingAC() { point ut(RingElement, !roundTrip(int):void, Tra ingAC.Tra ingWrapper, tokenPassed); point ut(RingElement, ?roundTrip(int):void, Tra ingAC.Tra ingWrapper, tokenArrived); }
lass Tra ingWrapper extends Wrapper {
publi Obje t tokenPassed( Intera tion i ) {
tra e.tra e(The token has been passed by +i.wrappee); return pro eed();
}
publi Obje t tokenArrived( Intera tion i ) {
tra e.tra e(The token has arrived in +i.wrappee); return pro eed();
} } }
Asyou anseeonthegureorwithintheJAC ode,thereisnomentionofdistribution. Thismeansthattheaspe t also works ifthe ring is running in a entralized or in a distributed mode (and for any sort of distribution that weprovide). Byusing AODA,wehave ompletelyseparatedthedistribution on ernfrom thetra ingonebutwe havealsomadetheaspe tsandtheirpoint utsemanti sinherentlydistributed. Thisdistributedsemanti sgreatly reinfor es the AOP expressiveness byallowing the modularized denition of extensionsthat ross utdistributed appli ations.
thetra ingaspe t). Forinstan e,ifyouwantallthetra estobe entralizedonthes0 ontainer,thenjust ongure adistributionaspe tasthefollowssothatallthe alls tothetra efeaturesareforwardedons0.
deploy "tra e0" "s0"
reateStubsFor "tra e0" "s0" ".*"
Thenalringappli ationar hite tureis giveningure11.
tracing aspect
tracing aspect
tracing aspect
s0
s1
s2
ringelement0
ringelement1
ringelement1
ringelement2
ringelement2
ringelement0
trace0
trace0
trace0
tokenPassed()
tokenArrived()
tokenArrived()
tokenPassed()
tokenPassed()
tokenArrived()
pointcut instance
S
S
A
A
A
Figure11: Theringexample ompletedwiththedistributionandtra ingaspe ts.
5 Implementation & performan e issues for JAC
5.1 Implementation of JAC
JACisentirelywritteninJava. Theaspe tweavingisperformedat lassloadtimeusingthebyte odeengineering libraryBCEL.Thisleavesustheabilityto weaveexistingappli ationswhosesour e odeisnotavailable. Insu h a ase, software integrators need only to knowthe methods on erned by the point ut denitions. The urrent distributionofJACprovidesaset ofpredened aspe ts fordistribution (eitherwith RMIorCORBASOAP to omein futurereleases),persisten e(JDBCorlesystem),GUI(Swing),authenti ation,transa tion, onsisten y, loadbalan ing,and broad asting. A GUI onsoleis provided to on-the-yweaveorunweaveaspe tson topofa runningappli ation. ACASEtoolimplementingtheUMLdesignnotationdenedinse tion2isalsoavailable(see gure12foras reenshot).
Thejoinpoints onsideredinJACaremethodinvo ationsandexe utions. Hooksareintrodu edtowardswoven aspe ts wheneverthese eventsare generated. The ideais notnewand has been proposed bymany authors (e.g. [Chi95℄) to implement MOPs. It onsists in introdu ing a stub method for ea h method of a base lass. These stub methodsintrodu tionsaredonebytranslatingtheoriginal lassessothattheirinstan es ansupport aspe t weaving.
Weinvestigated several te hniques to perform this translation. One of these is to use ompile-time ree tion by using anopen ompiler su h asOpenJava [Tat99℄. OpenJavais verypowerfulsin e itallows allkind of ode manipulation at ompile-time (ittakesJava odeand produ esa translatedJava ode). However, sin eitreies the whole syntax tree of the program it is quite slow and it is not very well suited to our simple problem (we under-use OpenJavafor su h asimple translation). Another solutionfor us is to perform the translation at the
byte odelevel. Several byte odetranslatorsareavailableandmostofthem anworkat lassload-time. Theidea istousea ustomized lass-loaderthatreadsthe lassleandmodiesthestream ontentsbeforea tuallydening and registering the new lass within the JVM. This solution is verywell suited for us. First, our translation is verysimpleand an beperformedwith very littleoverhead. Se ond,we antranslatethe lasses omingfrom a third-partyprogramorfrom externallibrarieswithnoneedoftheJavasour e ode.
We implemented the translation with two dierent byte ode translators. Javassist 1.0 [Chi00℄ is a ree tive high-leveltranslatorthat hidesthe omplexityofthebyte odeformatbyinstantiating aload-timemetamodel. It isquitefastandeasyto use. However,be auseofitshigh-levelAPI, Javassistintrodu essomerestri tionsonthe byte ode manipulations that an bedone (for instan e, onstru tors, stati s, and method invo ations annot be orre tlytranslated). Asawork-around,Javassist2.0proposesalow-levelAPIin additiontothehigh-levelone.
BCEL [Dah99℄ is the most popular byte ode translator. It proposes a verylow-level byte ode manipulation interfa ethatmakesitverypowerful(allkindoftranslations anbeperformed). Thetranslationweimplemented withBCELismore omplexandslowerthanwithJavassistbutthebyte odeprodu ed isofbetterquality.
5.2 Performan e measurements
The riti alpointoftheJACframeworkintermsofperforman esisthedynami wrappersinvo ationme hanism. Sin ethisinvo ationreliesonree tioninordertoa hievedynami addingorremovingofaspe ts,theperforman e overheadofJACmainly omesfromtheree tive allsoverhead. Table3showstheperforman esofemptymethod allsonregularobje tsandonJACwrappableobje ts. Thesetestsareperformedwithaben hprogramthat alls severalmethod withdierentprototypesandthat isavailablein theJACdistribution [JAC℄. Theben hprogram wasrun underLinuxwith aPentiumIII 600MHzwith 256KBof a heand withtheSUN'sJavaHotSpot Client VMversion1.4.
(A)regularobje t alls 6,000,000 55 9.16ns
-(B)ree tive alls 60,000 47 0.78s (A)x85
(C) JAC obje ts alls (0 wrapper) 60,000 61 1s (A)x 111 (B)x1.29 JAC(1wrapper) 60,000 85 1.41s (C)+41% JAC(2wrappers) 60,000 110 1.83s (C)+83% JAC(3wrappers) 60,000 130 2.16s (C)+116%
Table3: Comparativeperforman emeasurementsforJavaandJAC.
(withanoverhead of29%). Ea htime awrapperisadded, anoverheadofabout40%ofthe initialtimeis added (notethattheben haddsemptywrappersthat just allpro eed in theirimplementations).
Finally,thepri etopayforadaptabilityisquitehigh(asforree tion) omparedto ompiledapproa hessu h asAspe tJ.However,withreal-wordaspe tsandespe ially whentheappli ationisdistributed,this ostbe omes negligible omparedtotheadded ostofremote alls. Forthemoment, theJACapproa histhusmoresuitedfor middle grainedwrappableobje ts(onlybusiness obje tsare madewrappable in real-wordappli ations, te hni al omponentsthat needperforman esarenotaspe tized)andfordistributed andadaptableprogramming.
6 Related te hnologies and tools for AOP
Thisse tion omparesJACwithexistingapproa hesforAOPor loselyrelatedte hnologies.
The omposition lterobje tmodel (CFOM) [BA01℄is anextension to the onventional obje tmodel where inputandoutputlters anbedenedtohandlesendingandre eivingofmessages. Thismodelisimplementedfor several languages,in luding Smalltalk,C++ and Java. The latterimplementation isan extension to theregular Javasyntaxwhere keywordsareaddedtode lare,forinstan e, ltersatta hed to lasses. Thegoalsofthis model andoursare rathersimilar: to handleseparationof on erns atameta level. Nevertheless,JACdoesnotrequire anylanguageextension.
Aspe tJ[KHH +
01℄isapowerfullanguagethatprovidessupportfortheimplementationof ross utting on erns throughpoint uts( olle tionsofprin iplepointsintheexe utionofaprogram),andadvi es(method-likestru tures atta hed to point uts). Pre eden erules are dened when morethan oneadvi e applyat a join point. Inmany features(e.g. point utsdenition)Aspe tJhasari handvastsemanti s.Nevertheless,wearguethatinmany ases thatwehavestudied,simples hemessu hasthewrappingte hniqueproposedbyJACaresu ienttoimplement abroadrangeofsolutionsdealingwithseparationof on erns.
Aspe tual omponents [LLM99℄ and their dire t prede essors adaptative plug and play omponents [ML98, MSL00℄ dene patterns of intera tion, alled parti ipant graphs(PG), that implement aspe ts for appli ations. PGs ontainparti ipantsroles(e.g. publishersandsubs ribersin apublish/subs ribeintera tionmodel)that,(1) expe tfeatures aboutthe lassesuponwhi htheywillbemapped,(2)mayreimplementfeatures, and(3)provide somelo al features. PGsare then mapped onto lassgraphswith entities alled onne tors, that dene the way aspe ts and lasses are omposed. Aspe tual omponents anbe omposed by onne ting part of the expe ted interfa eof one omponentto partof the provided interfa eof another. Nevertheless, itseemsthat bydoingso, thedenition ofthe omposition ross utsthedenition oftheaspe ts, loosing bythiswaytheexpe ted benets ofAOP.
Subje t oriented programming[HO93℄[OKH +
95℄ (SOP) and its dire t su essorthe Hyper/J tool [TOHS99℄, provide theability tohandledierentsubje tiveperspe tives, alled subje ts,ontheproblem tomodel. Subje ts an be omposed using orresponden e rules (spe ifying the orresponden es between lasses, methods, elds of dierentsubje ts), ombinationrules(givingthewaytwosubje ts anbegluedtogether,and orresponden e-and- ombinationrulesthatmixbothapproa hes. PrototypeimplementationsofSOPforC++andSmalltalkexist,and amorere ent versionfor Java alled Hyper/Jis available. This lattertoolimplementsthe notionof hyperspa e [OT01℄thatpermitsthe expli it identi ation ofany on ernsof importan e.
programmingsystemontheOzlanguageandusesobje t/ omponent-orientation,de larative,logi ,and onstraint programming to support the separation of the fun tional and of the distribution on erns. It provides a good separationof on ernsdegreewithasupportformultipleparadigms. Despiteits ompletenature,the oreMozart does not take the full advantageof new AO programming on epts su h as aspe t- lasses or point uts. In our opinion, it is therefore moredi ult to apprehend and less exible sin ethe provided on erns are built-in (but ongurable)withinthesystem.
Superimpositions [SK02℄ are also an approa h for separationof on erns in distributed environments. It is a theoreti alworkthatfurnishesalanguagethat anbeappliedtoAOP.Weare urrentlyworkingonusingsomeof thefundamental on eptsofsuperimpositionsinouraspe ts.
Finally, several proje tssu h asLasagne[TVJ +
01℄, JMangler[KCA01℄, orPROSE [PGA02℄ provide dynami weaving/unweavingofaspe tsthat makesthem losefromtheJACimplementation. However,noneof themfully handletheautomati distributionoftheaspe tswhentheappli ationisdistributed.
7 Con lusion
JACisaframeworkforaspe t-orientedprogramming(AOP)inJava. Itprovidesageneralprogrammingmodeland anumberofartifa tstoletprogrammersdevelopaspe t-orientedappli ationsinaregularJavasyntax(i.e. without any synta ti al languageextensions). Themain elementsmanaged bytheframeworkareaspe t omponents(AC for short). Theyarethe pie e of ode that apturea ross- utting on ern. Likein others AOPapproa hes,the ideaisto modularizethis on ernto easeitsmaintenan eandits evolution. JACprovides ontainerstohostAC andbusiness(also alledbase) omponents. Inthe urrentversionofJAC(downloadablefromourwebsite[JAC℄), these ontainersareremotelya essibleeitherwithRMI,orwithCORBA.Furtherdevelopmentsareunderwayfor theSOAP ommuni ationproto ol.
ACsdene twomain elements: point ut relationsand AC-methods. Point ut relationsarethemethods ofthe baseprogramwhosesemanti sismeanttobeextendedbytheAC.AC-methodsaretheblo ksof odethatperform theextension. Theoriginalityof point ut relationswith JAC isthat they anbe denedon aper- lassbasis(all instan es of some given lasses are equally extended), or on a per-instan e basis (only given instan es of some lassesareextended). Toa hievethisfeature,anamings hemeisprovidedforea hbaseinstan emanagedbythe framework. A languageforpoint utsdenitionis providedthatletdeveloperslterinstan esbasedontheirname oronthenameofthe ontainerhostingthem. TheAC-methodsprovide odethat anberunbeforeand/orafter, orrepla ethemethodsdesignatedbythepoint ut.
An UML notation has been proposed in se tion 3. The stereotypes provided enable designers to express all theabovementioned elements on erning AC, point ut relations, andAC-method. Se tion 3.4investigatedsome moreadvan ed on eptswhereAOPis omparedtotheuse-providerelationshipandtosomenotionsof groupsof heterogeneous lasses. ThenotationissupportedbyaCASEtool.
Referen es
[BA01℄ L. BergmansandM.Aksit. Software Ar hite tures andComponent Te hnology, hapter Constru ting ReusableComponentswithMultipleCon ernsUsingCompositionFilters.KluwerA ademi Publishers, 2001.
[Chi95℄ S. Chiba. A metaobje tproto ol for C++. InPro eedings of OOPSLA'95, volume 30 of SIGPLAN Noti es,pages285299.ACM Press,O tober1995.
[Chi00℄ S. Chiba. Load-timestru tural ree tionin java. In Pro eedings of the 14th European Conferen e on Obje t-OrientedProgramming(ECOOP'00),volume1850ofLe tureNotesinComputerS ien e,pages 313336.Springer,June2000.
[Dah99℄ M.Dahm. Byte odeengineering. InPro eedings ofJIT'99,1999. http://b el.sour eforge.net.
ofOOPSLA'93,volume28ofSIGPLANNoti es,pages411428.ACMPress,O tober1993.
[JAC℄ TheJACproje thomepage. http://ja .aopsys. om.
[KCA01℄ G.Kniesel,P.Constanza,andM. Austermann. JMangler-aframeworkforload-timetransformation of java lass les. In Pro eedings of the IEEE Workshop on Sour e Code Analysis and Manipulation (SCAM'01).IEEEComputerSo ietyPress,November2001.
[KHH +
01℄ G.Ki zales,E.Hilsdale,J.Hugunin,M.Kersten,J.Palm,andW. Griswold. An overviewofAspe tJ. InPro eedingsofthe15thEuropeanConferen eonObje t-OrientedProgramming(ECOOP'01),volume 2072ofLe tureNotesinComputer S ien e,pages327353.Springer,June2001.
[KLM +
97℄ G.Ki zales, J. Lamping,A. Mendhekar,C. Maeda, C. Lopes, J.M. Loingtier,and J. Irwin. Aspe t-orientedprogramming. InPro eedings of the 11thEuropean Conferen e onObje t-Oriented Program-ming(ECOOP'97),volume1241ofLe tureNotesinComputer S ien e,pages220242.Springer,June 1997.
[LLM99℄ K.Lieberherr,D. Lorenz,andM.Mezini. Programmingwithaspe tual omponents. Te hni alReport NU-CCS-99-01,NortheasternUniversity'sCollegeofComputerS ien e,April1999.
[ML98℄ M.Mezini andK. Lieberherr. Adaptativeplug-and-play omponentsfor evolutionarysoftware devel-opment. In Pro eedings of OOPSLA'98,volume 33of SIGPLAN Noti es, pages 96116.ACM Press, 1998.
[MSL00℄ M.Mezini, L.Seiter, and K.Lieberherr. Componentintegration with pluggable omposite adapters. InL.Bergmansand M.Aksit, editors, Software Ar hite turesand Component Te hnology: The State ofthe Artin Resear h andPra ti e.KluwerA ademi Publishers,2000.
[OKH +
95℄ H.Ossher,K.Kaplan,W.Harrison,A.Matz,and V.Kruskal. Subje t-oriented ompositionrules. In Pro eedings ofOOPSLA'95,volume30ofSIGPLANNoti es,pages235250.ACMPress,1995.
[OT01℄ H. Ossher and P. Tarr. Multi-dimensional separation of on erns and the hyperspa e approa h. In Software Ar hite turesandComponent Te hnology.KluwerA ademi Publishers,2001.
[Par72℄ D. Parnas. Onthe riteriato be usedin de omposingsystemsinto modules. Communi ations of the ACM, 15(12):10531058,1972.
[Paw02℄ R.Pawlak. AOSDwithJAC- hapter 8fromPhD.thesis. CNAMParis,De ember2002.
[PDF +
℄ R.Pawlak,L.Du hien, G.Florin, F.Legond-Aubry, L.Seinturier,and L.Martelli. JAC: An aspe t-baseddistributed dynami framework.Submittedto BritishComputerS ien e.
[PDF +
02℄ R.Pawlak,L.Du hien,G.Florin,F.Legond-Aubry,L.Seinturier,andL.Martelli. An UMLnotation foraspe t-orientedsoftwaredesign. InWorkshopon Aspe t-OrientedModeling withUMLatAOSD'02, April2002.
[PGA02℄ A.Popovi i,T.Gross,andG.Alonso. Dynami weavingforaspe torientedprogramming. In Pro eed-ingsof the1stInternational Conferen eon Aspe t-OrientedSoftware Development (AOSD'02), 2002.
[PSDF01a℄ R. Pawlak,L. Seinturier, L. Du hien, and G. Florin. Dynami wrappers: Handling the omposition issuewithJAC. InPro eedings of TOOLSUSA2001. IEEEComputerSo ietyPress,July2001.
[PSDF01b℄ R. Pawlak, L. Seinturier, L. Du hien, and G. Florin. JAC: A exible solution for aspe t-oriented programming in Java. In Pro eedings of Ree tion'01, volume 2192 of Le ture Notes in Computer S ien e,pages124.Springer,September2001.
[SK02℄ M.Sihmanand S. Katz. A al ulusof superimpositions fordistributed system. InPro eedings of the InternationalConferen e onAspe t-OrientedSoftwareDevelopment (AOSD'02),pages2840,2002.
http://www.javasoft. om/produ ts/ejb.
[Tat99℄ M. Tatsubori. An extension me hanism for the Java language. Master of Engineering Disser-tation, Graduate S hool of Engineering, University of Tsukuba, Ibaraki, Japan, February 1999. http://www. sg.is.tite h.a .jp/openjava/.
[TOHS99℄ P.Tarr,H.Ossher,W.Harrison,andS.Sutton. Ndegreesofseparation: Multi-dimensionalseparation of on erns. InPro eedings ofthe International Conferen eonSoftwareEngineering(ICSE'99),pages 107119,1999.
[TVJ +
01℄ E. Truyen, B. Vanhaute, W. Joosen, P. Verbaeten, Joergensen, and N. Bo. Dynami and sele tive ombinationofextensionsin omponent-basedappli ations. InPro eedingsof ICSE'01,2001.
[Van99℄ Peter VanRoy. Onthe separation of on ernsindistributedprogramming: Appli ation todistribution stru tureandfaulttoleran einMozart. WorldS ienti ,TohokuUniversity,Sendai,Japan,July1999.