RE: [aspectwerkz-user] Hot deployment questions
"Vincent Massol" <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
I've progressed as I've got it to work! I'll answer my own questions below :-) > -----Original Message----- > From: Vincent Massol [mailto:[email protected]] > Sent: dimanche 10 avril 2005 11:00 > To: [email protected] > Subject: [aspectwerkz-user] Hot deployment questions > > Hi, > > I'm still trying to get hot deployment to work for Cactus2... I have now > decided to try using JDK 5.0 to get started. > > I have some questions: > > 1/ On http://aspectwerkz.codehaus.org/dynamic_aop.html it says to use the > following to get a deployment scope: > > DeploymentScope scope = SystemDefinition.getDefinitionFor(loader, > systemId).getDeploymentScope("toString"); > > However the SystemDefinition object does not have a static getDefinition() > method. It does have a non-static method of this name though. How do I get > a > SystemDefinition object? Do I need to create one using "new"? If so what > string should I pass? The same as the systemId defined in aop.xml? I still have no idea. However I've found that not using a DeploymentScope seems to work. I would still like to know how to get a definition and what are the cases when not having a DeploymentScope will not work. Any idea? > 2/ In > http://blogs.codehaus.org/people/jboner/archives/000913_aspect_hot_deploym > en > t_in_practice_implementing_a_jmx_monitoring_aspect_.html, Jonas says, in > the > "Define a deployment scope" section: > > "This can be done either in the META-INF/aop.xml file or using annotations > in the aspect class" > > Thus it seems possible not to have anything defined in aop.xml. Thus > something like this would work, right? > > <aspectwerkz> > <system id="cactus2"/> > </aspectwerkz> Actually it seems it works even with no aop.xml at all! Cool, that's exactly what I wanted! :-) > 3/ Would it also work if I have a generic deployment scope such as: > > <aspectwerkz> > <system id="cactus2"> > <deployment-scope name="allcode" expression="within(..)"/> > </system> > </aspectwerkz> Not tried yet. > 4/ If I use the Deployer.deploy(class, xmlDef) method, do I also need to > define the xmlDef in the aop.xml file or can it be empty. Not tried yet. > 5/ If the aop.xml file is empty, do I still need one? Apparently not! Thanks -Vincent _________________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com