[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] Custom JoinPoints
|
Thanks. Has this been discussed among the AspectJ think
tanks ( Iam guessing you are one of them :))? Iam sure it should have come up
because AspectWerkz does provide a JoinPointFactory class, although Iam not
familiar with it. It would surely be convenient to have custom Join
points.
Savita, One could imagine an interface that would allow an aspect
to supply a factory for JoinPoint objects to be passed to the advice it
declares. It would only allow custom JoinPoint rather than custom
JoinPoint.Static part instances as the latter must be shared and duplication
would be expensive and complex to manage. The interface might take to form of a
JoinPoinFactoryProvider Java interface where the aspect returns a sub-class of
org.aspectj.runtime.reflect.Factory (although this class is currently final and
rather cryptic/complex): public aspect
FlightRecorder implements JoinPointFactoryProvider {
purblic Factory getJoinPointFactory (...)
{ ...
} } I am just thinking on
my feet. If you think the approach using existing language features is not
sufficient then I suggested you raise an enhancement request.
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
03/10/2006 06:26
Please respond
to aspectj-users@xxxxxxxxxxx |
|
To
| <aspectj-users@xxxxxxxxxxx>
|
cc
|
|
Subject
| RE: [aspectj-users] Custom
JoinPoints |
|
you are right its a good idea although, there is no verdict on
AspectJ allowing custom Join points yet.
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Matthew
Webster
Sent: Monday, October 02, 2006 2:59 AM
To:
aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Custom
JoinPoints
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
_______________________________________________
aspectj-users mailing
list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users