RE: [aspectwerkz-user] help with aspect not weaved
[email protected] Thu, 23 Jun 2005 20:16:44 -0400
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <3E62A5A0B8058845984FFA345CE894F2060CBF34@NSTMC007PEX1.ubsgs.ubsgroup.net> |
Hello,
Thanks a lot for the help! It worked now.
I have one question for hot deployments of aspects though, for Alex et al.: is it possible to do a hot deployment on a perClass basis at least (if not perInstance). For instance I have the following in aop.xml:
<deployment-scope name="allMethods" expression="execution(* com.ubs.firc.credit.jrisk2003_2.dataaccess.prion.core.prion.ejbPrionEJBHelper.*(..))"/>
<deployment-scope name="toString" expression="execution(String *.toString())"/>
and then, I programmatically create the XML for the aspects that I want to deploy perClass:
xmlDef="<aspect class='test.com.ubs.firc.support.aspect.GenericMethodDecorator' deployment-model='perClass'> " +
"<pointcut name='prionHelper' expression='execution(* com.ubs.firc.credit.jrisk2003_2.dataaccess.prion.core.prion.ejbPrionEJBHelper.*(..))'/>" +
"<advice name='decorate' type='around' bind-to='prionHelper'/>" +
"</aspect>";
h1 = Deployer.deploy(GenericMethodDecorator.class, xmlDef, scope1);
xmlDef="<aspect class='test.com.ubs.firc.support.aspect.GenericMethodDecorator' deployment-model='perClass'> " +
"<pointcut name='bla' expression='execution(* net.appl.jrisk.util.ErrorStack.toString())'/>" +
"<advice name='decorate' type='around' bind-to='bla'/>" +
"</aspect>";
h2 = Deployer.deploy(GenericMethodDecorator.class, xmlDef, scope2);
So I'm hoping to deploy two separate instances of the GenericMethodDecorator aspect, one for the ejbPrionEJBHelper and another for the ErrorStack class. However, a singleton instance is attached to both of them. Is what I'm attempting to do supported at all? Or should I implement this contextual behavior (dependent on the target class) in my aspect by examining JoinPoint instances..?
Thanks,
Boris
|-----Original Message-----
|From: Michael Haupt [mailto:[email protected]]
|Sent: Thursday, June 23, 2005 2:34 PM
|To: [email protected]
|Cc: Iordanov, Borislav; [email protected]
|Subject: RE: [aspectwerkz-user] help with aspect not weaved
|
|
|Hi,
|
|
|Borislav Iordanov wrote:
|> However, the class
|> JRiskSecurity_1__2130939767_1948679980___AW_JoinPoint is
|nowhere to be
|> found... :(
|
|
|I used to have the same problem until someone on this friendly
|and helpful
|mailing list :-) told me to modify the
|classorg.codehaus.aspectwerkz.transform.inlining.compiler.Abstr
|actJoinPointCompiler,
|namely to set its member DUMP_JIT_CLASSES to true. After
|recompiling that
|class (and updating the JAR), it should work, and JoinPoint
|classes should
|be dumped.
|
|Best,
|
|
|Michael Haupt
|
|
|
|
|
Visit our website at http://www.ubs.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.