Quantcast

How to remove aspectjrt.jar runtime dependecy while using AspectJ

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to remove aspectjrt.jar runtime dependecy while using AspectJ

Rajendra Prasad Vissapragada
Hi Andy,
 The reason we can't have dependency on aspectjrt.jar
is it will be run in a applet like env. on the client
machine who may have plain JDK installed and on
different OS.

And we don't want to force clients to download
aspectjrt.jar. We want just the logging to be enabled
using aspects.
To be clear, at the compilation time the aspects have
to be injected into the code/class files and that
should be the AspectJ dependecy end.

Is there any way I can do this, even some alternatives
of it will do as long as I don't require aspectjrt.jar

Thanks,
Rajendra

=============
Date: Thu, 2 Mar 2006 12:33:48 +0000
From: "Andy Clement" <[hidden email]>
Subject: Re: [aspectj-users] How to remove
aspectjrt.jar runtime
        dependecy while using AspectJ
To: [hidden email]
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Depending on the features you are using in the aspect,
you may or may
not
have a hard dependency on aspectjrt.jar - are you
using
thisJoinPoint/thisJoinPointStaticPart? or cflow? those
are the kind of
things that cause you a dependency on aspectjrt.jar.

Why is it that you cannot have a dependency on
aspectjrt.jar - is it
that it
is too big?  It is true aspectjrt.jar has grown a lot
in AspectJ1.5.0
and it
is likely you only need a small subset (unless you are
using the new
AspectJ
reflection support or using the @AJ syntax
development).  We have been
having thoughts about shipping multiple variants, a
small core one for
environments like J2ME that don't need the extras and
the big one for
those
wanting to utilise all the capabilities.

Andy.

On 02/03/06, Rajendra Prasad Vissapragada
<[hidden email]> wrote:
>
> Hi,
> I have a scenario, where I would like to implement
> logging using aspects(AspectJ). But when we build
with
> AJC the ajc weaves logging code into the class files
> and also keeps a reference to aspectjrt.jar classes.
>
> I want aspectj to weave the logging into the code,
but
> shouldn't require the aspectjrt.jar (although it is
of
> smaller footprint).
> Plainly speaking it should run under normal JVM.
>
> Is there any way of doing this?
>
> Thanks,
> Rajendra


               
___________________________________________________________
Win a BlackBerry device from O2 with Yahoo!. Enter now. http://www.yahoo.co.uk/blackberry
_______________________________________________
aspectj-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to remove aspectjrt.jar runtime dependecy while using AspectJ

Adrian Colyer-2
Since you're logging, I'm presumably that you possibly *are* using thisJoinPoint or thisJoinPointStaticPart?  You don't need all of aspectjrt.jar, but you probably need a good subset of the content of the 'runtime' module ( http://dev.eclipse.org/viewcvs/index.cgi/org.aspectj/modules/runtime/?cvsroot=Technology_Project and follow the src folder). You could extract these types from aspectjrt.jar and just include them directly in the archive of your applet. A dependency analyzer tool might help you further narrow down the exact set of types that your applet actually needs.

regards, adrian.

On 02/03/06, Rajendra Prasad Vissapragada <[hidden email]> wrote:
Hi Andy,
The reason we can't have dependency on aspectjrt.jar
is it will be run in a applet like env. on the client
machine who may have plain JDK installed and on
different OS.

And we don't want to force clients to download
aspectjrt.jar. We want just the logging to be enabled
using aspects.
To be clear, at the compilation time the aspects have
to be injected into the code/class files and that
should be the AspectJ dependecy end.

Is there any way I can do this, even some alternatives
of it will do as long as I don't require aspectjrt.jar

Thanks,
Rajendra

=============
Date: Thu, 2 Mar 2006 12:33:48 +0000
From: "Andy Clement" < [hidden email]>
Subject: Re: [aspectj-users] How to remove
aspectjrt.jar runtime
        dependecy       while using AspectJ
To: [hidden email]
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Depending on the features you are using in the aspect,
you may or may
not
have a hard dependency on aspectjrt.jar - are you
using
thisJoinPoint/thisJoinPointStaticPart? or cflow? those
are the kind of
things that cause you a dependency on aspectjrt.jar.

Why is it that you cannot have a dependency on
aspectjrt.jar - is it
that it
is too big?  It is true aspectjrt.jar has grown a lot
in AspectJ1.5.0
and it
is likely you only need a small subset (unless you are
using the new
AspectJ
reflection support or using the @AJ syntax
development).  We have been
having thoughts about shipping multiple variants, a
small core one for
environments like J2ME that don't need the extras and
the big one for
those
wanting to utilise all the capabilities.

Andy.

On 02/03/06, Rajendra Prasad Vissapragada
< [hidden email]> wrote:
>
> Hi,
> I have a scenario, where I would like to implement
> logging using aspects(AspectJ). But when we build
with
> AJC the ajc weaves logging code into the class files
> and also keeps a reference to aspectjrt.jar classes.
>
> I want aspectj to weave the logging into the code,
but
> shouldn't require the aspectjrt.jar (although it is
of
> smaller footprint).
> Plainly speaking it should run under normal JVM.
>
> Is there any way of doing this?
>
> Thanks,
> Rajendra



___________________________________________________________
Win a BlackBerry device from O2 with Yahoo!. Enter now. http://www.yahoo.co.uk/blackberry
_______________________________________________
aspectj-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/aspectj-users



--
-- Adrian
[hidden email]
_______________________________________________
aspectj-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Loading...