[aspectwerkz-user] Hot deployment questions
"Vincent Massol" <[email protected]>
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
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?
2/ In
http://blogs.codehaus.org/people/jboner/archives/000913_aspect_hot_deploymen
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>
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>
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.
5/ If the aop.xml file is empty, do I still need one?
Thanks and sorry for all those newbie questions but I really have a hard
time understanding all this even though I have read and re-read at least 5
times the docs on the web site ;-) I should probably read the source code to
try to understand how it all works but then this is a bigger task which I
would prefer not to start now :-)
Thanks
-Vincent