[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] Custom JoinPoints
|
you are right its a good idea although, there is no verdict
on AspectJ allowing custom Join points yet.
Savita, One approach would be to use two (compound) pointcuts
each associated with a different piece of advice. The first selects join points
with the "problematic" dynamic context you describe and creates a custom
JoinPoint implementation, with processed object references, which it stores. The
second pointcut selects all other interesting join points and stores the
"vanilla" JoinPoint object. Matthew
Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park,
Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external)
246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB,
matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/
"Chandan, Savita"
<Savita.Chandan@xxxxxxxxxxxxxx> Sent by: aspectj-users-bounces@xxxxxxxxxxx
30/09/2006 01:56
Please respond
to aspectj-users@xxxxxxxxxxx |
|
To
| <aspectj-users@xxxxxxxxxxx>
|
cc
|
|
Subject
| RE: [aspectj-users] Custom
JoinPoints |
|
I was intending to do more research before I responded to any
of the
other emails, but haven't had a chance to do that.
Anyways, My
requirement was,
If I could have a custom JoinPoint that can do special
translation for
some specific method arguments in its current
context.
The reason being, In a FlightRecorder utility, if I were to
cache the
JoinPoint for dumping the data to a log file at a later time and
one of
the method arguments had a huge memory footprint, I wouldn't want
to
cache that particular argument and hold on to the reference, instead
I
would convert that parameter to a brief String in the JoinPoint
and
cache the JoinPoint. My Custom JoinPoint would detect such arguments
and
immediately convert them to a brief string and not cache the
object
argument ( Not sure what can of worms that this would open, but
it
should be doable right?)
Now, may be there are other ways of doing
this without derived/Custom
JoinPoint, like the user object proposed in the
bug for AspectJ
https://bugs.eclipse.org/bugs/show_bug.cgi?id=89009. This
would mean
creation of 2 objects for logging ( one is the JoinPoint that
would be
created and other is the userObject to be set in the JoinPoint
in
addition to some reflection calls). I think the hit would be limited
to
creation of just 1 Object if the userObject was part of
StaticJoinPoint
( which was also suggested in the bug comments).
Or
another idea that was brought up independent of AspectJ was using
weak
references which again is Object creation ( might end up doing this
if
nothing else works).
Hope this discourse above is clear enough to
explain my requirements.
Savita
-----Original
Message-----
From:
aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx]
On Behalf Of Ron Bodkin
Sent: Friday, September 29, 2006 10:42 AM
To:
aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Custom
JoinPoints
So Savita,
Inquiring minds want to know: what
behavioral modification of a join
point
are you seeking to
achieve?
-----Original Message-----
From:
aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx]
On Behalf Of Chandan, Savita
Sent: Wednesday, September 27, 2006 11:38
PM
To: wes@xxxxxxxxxxxxxx; aspectj-users@xxxxxxxxxxx
Subject: RE:
[aspectj-users] Custom JoinPoints
Of course you are right, I should be
able to do add the functionality to
AspectJ, that is something that is under
our control. I will also create
a case for letting users create custom
JoinPoints in AspectJ. Iam sure
if Aspectwerkz allowed it and aspectbench
allows it, there are already
compelling usecases for having done that in
these products.
-----Original Message-----
From:
aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx]
On Behalf Of Wes
Sent: Wednesday, September 27, 2006 9:01 PM
To:
aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Custom
JoinPoints
AspectJ is open-source, so you can write and use a
different
implementation.
aspectjrt.jar combines the runtime and
aspectj5rt projects.
Just make sure it's binary-compatible, and, for
clarity's sake, rename
the
jar as your internal version - e.g.,
"aspectjrt-tencor-1.1.jar"
If you want us to support new features, please
submit a compelling
bug/use-case.
Thanks -
Wes
http://www.eclipse.org/aspectj/doc/released/faq.html#q:buildingsource
http://dev.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
>
------------Original Message------------
> From: "Chandan, Savita"
<Savita.Chandan@xxxxxxxxxxxxxx>
> To:
aspectj-users@xxxxxxxxxxx
> Date: Wed, Sep-27-2006 2:08 PM
>
Subject: [aspectj-users] Custom JoinPoints
>
> Hi
>
> Does AspectJ allow inheriting from the JoinPoint class and creating
a
> custom JoinPoint class?
> If it does how do I plug in the
derived JoinPoint into AspectJ
> framework?
>
>
>
Thanks,
> Savita
>
_______________________________________________
> aspectj-users mailing
list
> aspectj-users@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing
list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users
mailing
list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users
mailing
list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users
mailing
list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users