[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: Re :[aspectj-users] aspect on a java API class
|
Weaving of java. and javax. types has been discussed on the list
recently. You need an up to date AspectJ and you need to use a weaver
option to force it to weave those types in addition to normal
configuration info. The Javax one is shown below, the
weaveJavaPackages=true option is what you need.
Andy.
> I think you are possibly being affected by the code we have that
> prevents LTW of anything beginning java.* or javax.* :) See this
> bugzilla entry from a while back
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=149261 : "Allow weaving
> javax..* types"
>
> In which case, you need to download a recent dev build of AspectJ from
> the downloads page and use the option:
>
> <weaver options="-Xset:weaveJavaxPackages=true"/>
>
> Andy.
On 29 Feb 2008 19:12:55 -0000, Kunal Pathak
<kunalpathak2006@xxxxxxxxxxxxxx> wrote:
> Hi Laurent ,
>
> I tried a "without annotation" approach for load time weaving and i could
> execute an advice code for the joinpoint you mentioned. Can you please try
> out using simple aj command or you want to use the annotation? I mean I
> don't think it's the problem due to annotation, but still want to know.
>
> Thanks,
> Kunal.
>
> On Fri, 29 Feb 2008 17:59:18 +0100 aspectj-users@xxxxxxxxxxx wrote
>
>
> Hi all,
>
>
>
> I am (still) trying to put a joinpoint on a java API class :
> java.math.BigDecimal
>
> I try to do it with load time weaving LTW (with a JavaAgent)
>
>
>
> My aspect is like this :
>
> @Aspect
>
> public class AppAspect {
>
> @After("execution(* java.math.BigDecimal.valueOf(..))")
>
> public void afterBigDecimal(JoinPoint jp) {
>
> System.out.println("grouik BigDecimal");
>
> }
>
> }
>
>
>
> And, because I know it is normally not authorized to do it,
>
> I bypass the loading of the BigDecimal of the rt.jar, by bootloading an
> extracted java.math.BigDecimal.
>
> I do it by adding in the JVM parameters -Xbootclasspath/p:"D:... arget
> est-classes emp"
>
> where ... emp contains javamathBigDecimal.class
>
>
>
>
> But when I execute this, the advise is not executed...
>
>
>
> Is the bypass a good solution ? If yes, why does it not working ? If no, is
> there another way ?
>
>
>
> Thanks in advance.
>
>
>
> Laurent Delaforge
>
>
>
> Attention:
> L'integrite de ce message n'etant pas assuree sur Internet, les societes du
> groupe ODDO ne peuvent etre tenues responsables de son contenu. Ce message
> et les eventuels fichiers attaches contiennent des informations
> confidentielles. Au cas ou il ne vous serait pas destine, nous vous
> remercions de bien vouloir le supprimer et en aviser l'expediteur.
> This message and the files that may be attached to it contain confidential
> information. The ODDO group may not be held responsible for their contents,
> whose accuracy and completeness cannot be guaranteed over the internet. If
> the message is not addressed to you, kindly delete it and notify the sender.
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>