[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Re: [NEWSDELIVER] Re: RCP & AspectJ
|
RCP applications are just collections
of bundles. You can simply write bundles using AspectJ and deploy them
on RCP along with the org.aspectj.runtime bundle/plugin. When the work
from the Aspects incubator becomes available it too will be in the form
of bundles (and some platform extensions) which you could also deploy on
RCP and take advantage of seamless LTW.
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/
To:
undisclosed-recipients:;
cc:
Subject:
[NEWSDELIVER]
Re: RCP & AspectJ
What I should do if I want to use Aspects in RCP?
Thanks
Adrian Colyer wrote:
> Hi Mario,
> We've also done a lot of experimenting with aspects and plugins
> (strictly, OSGi). The result is the equinox incubator "AOSGi"
project
> (http://www.eclipse.org/equinox/incubator/aspects/index.php), which
is a
> joint Eclipse incubation project between Martin Lippert (AJEER) and
the
> OSGi integration that we developed in Hursley. There's a bunch of
code
> going through legal reviews etc. at the moment, then once it
can be
> uploaded the project should spring into life (Matthew Webster and
Martin
> Lippert are the joint leads). It will give you very nice integration
of
> aspects in bundles (without needing to promote to the system-wide
level
> if you don't want to) and can deliver very good performance. It's
also
> possible to integrate a cache so after you bring up a configuration
for
> the first time, the woven class files are cached - thus subsequent
> start-up overhead with the same configuration is zero.
>
> Watch this space for more info, and do get in touch with Matthew and
> Martin because the more real requirements and projects we have in
this
> space the better we can make the support.
>
> Regards, Adrian.
>
> Mario Scalas wrote:
>> Hi, all: I've been busy trying to make them (aj & rcp) work
together
>> and I'd
>> like to share my experiences, hoping they could help some other
people
>> and
>> have some of my (confused) ideas clarified.
>>
>> I've a bunch of aspects scattered along several plugins in my
RCP
>> application: some of them are shared among different plugins so
I'd
>> like to
>> put them in an "aspects collection plug-in".
>> So I've put my test abstract aspect (a dummy logger) in my aspects
>> plugin,
>> added this as a plug-in dependency to my own to-be-weaven plug-in,
>> implemented the concrete aspect using the "participant pattern"
explained
>> in [4] and crossed the fingers.
>> Now:
>> 1) the IDE shows the captured join points (good) (see [3])
>> 2) when I execute my application the awaited aspect's output is
simply
>> absent so I guess that my aspects has been forgotten :S (bad)
>>
>> Then I read on the mailing list about AJEER ([2], Martin Lippert
has
>> updated
>> it to the latest stable AspectJ 5.0 release) and configured my
>> application
>> as explained in [1]. I've added a second aspect to my aspects
plug-in
>> which
>> implements the worker object pattern as explained in [4] (just
using some
>> custom annotations to mark the methods to be run in a different
thread).
>> Now the console output of my app becomes:
>>
>> MY PERSONAL ADAPTOR IS CREATED AND WILL START THE FRAMEWORK
>> Start Weaving Service
>> aspect promoted to the system:
>> it.uniba.di.cdg.xcore.aspects.it.uniba.di.cdg.xcore.aspects.AnnotatedAsynchronousExecution,
>>
>> 1.0.0
>> aspect promoted to the system:
>> it.uniba.di.cdg.xcore.weaveme.it.uniba.di.cdg.xcore.weaveme.View$OwnLog,
>> 1.0.0
>> WeavemePlugin.start()
>> additional classes put in cache:
>> it.uniba.di.cdg.xcore.weaveme.View$AjcClosure1
>> [Before] execution(View.createPartControl(..))
>> [Before] execution(View.setFocus())
>> [START] AsynchronousExecution.around()
>> [END] AsynchronousExecution.around()
>> <snip: some counting follows ...>
>>
>> Wow, this is nice ... but it is *sloooow*: it takes 20+ seconds
on my
>> p3@2.5GHz / 1G linux box to show the application window (most
time
>> seems to
>> be spent after the "additional classes put in cache:"
message): and there
>> are just two plugins (+ the 2 AJEER plugins and the RCP runtime).
>>
>> If you are interested you can download my test application in
[5]. It is
>> composed by:
>> - an aspects plugin which collects all of my test aspects
>> - a "weaveme" plugin containing the view and product
- a "weaveme"
>> feature projects that I used to compose my product since
>> configuring it with plugins didn't make the eclipse runtime happy
(no
>> product id found :S).
>> (Obviously you must have the AJEE plugins in your target platform
>> directory!)
>>
>> So what are your current experiences with the subject?
>> Regards
>> Mario
>>
>> Ps: Hmmm ... perhaps this is heavy matters for holidays season
:)
>> Merry xmas
>> and happy new year to all the people out there, anyway.
>>
>> [1] http://ajeer.sourceforge.net/?cat=3
>> [2] http://sourceforge.net/projects/ajeer
>> [3] http://cdg.di.uniba.it/~mscalas/join_points.png
>> [4] AspectJ in Action (see also
>> http://www-128.ibm.com/developerworks/java/library/j-aopwork3/
)
>> [5] http://cdg.di.uniba.it/~mscalas/ajeer_experiment.tar.gz
>>