RE: [aspectwerkz-user] Weaving aspects into abstract class initialisation
"Bygrave, Graham BGI UK" <[email protected]> Fri, 27 May 2005 09:51:41 +0100
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <03D8E4DA4B752943B2F3F073ABDAE8363041F4@ldnnte2k032.insidelive.net> |
Thanks for your reply. Does ltw mean Load time weaving? I'm implementing an object counter for both war and ejb jar classes, as we seem to be leaking memory somewhere. Not too keen on load time weaving as this would be slower and require an appserver restart. Indeed I'm using a mix of finalize for non entity bean classes and unset entity context for entity beans (don't have session beans). The primary thing I note (was another question to the list) was that methods don't get woven polymorphically (i.e. aspects don't get called for methods not actually implemented in the target class). This is obviously a problem when calling finalize, as it's not overridden in most of our classes, which just defer to java.lang.Object. At the moment, I'm using a perl script to modify the code prior to compile and this seems to work quite well. Obviously and aspect oriented solution would be preferable though. Best wishes, Graham. -----Original Message----- From: Alexandru Popescu [mailto:[email protected]] Sent: 26 May 2005 19:12 To: [email protected] Subject: Re: [aspectwerkz-user] Weaving aspects into abstract class initialisation #: on behalf of Bygrave, Graham BGI UK :: 5/24/2005 3:35 PM :# > Hi, > > I want to build compile an aspect into a web application using the offline approach. As the actual EJBs are generated on deploy, I can't weave my aspect into them. So as a cludge fix, I want to weave my aspect into abstract class intialisations/finalisations instead. Is there currently any way to do this in the existing pointcut syntax? > > Best wishes, > Graham. > > Hi Graham, I am not sure i am getting some of the above explanations: 1/ why not consider the ltw? 2/ what EJBs get generated at deploy? (what are you really trying to advice?) 3/ staticinitialization pointcut definition is meant for static initialization, as for finalization what do you mean by this? (the normal finalize() or the EJB lifecycle?) cheers, :alex |.::the_mindstorm::.|