Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » stop bundle osgi using Aspectj advice
stop bundle osgi using Aspectj advice [message #663917] Wed, 06 April 2011 19:43 Go to next message
moha  is currently offline moha Friend
Messages: 43
Registered: March 2011
Member
Hi,

i want to start an OSGI bundle if some informations about this bundle are right , else the bundle must be in the RESOLVED state.

for doing that , i developed an aspect wich contains a pointcut ( with a joinPoint = execution of the start method of the bundle) and an Around advice : i used proceed() if the informations about the bundle are corrects, However i always get the bundle in active state.


any idea ?

thanks in advance.
Re: stop bundle osgi using Aspectj advice [message #664388 is a reply to message #663917] Fri, 08 April 2011 15:33 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
I need a little more background on what you are trying to do before I can really answer.



  1. Is your aspect in the same bundle that it is trying to control? Or is it external?
  2. Are you trying LTW or CTW?


If the aspect is internal to the bundle, then you will need to use compile time weaving, but if external, then you will need load time weaving (but not just any load time weaving, you will need to use Equinox Weaving).
Re: stop bundle osgi using Aspectj advice [message #664551 is a reply to message #664388] Mon, 11 April 2011 06:44 Go to previous messageGo to next message
moha  is currently offline moha Friend
Messages: 43
Registered: March 2011
Member
Hi,

i try to integrate Aspectj (annotation) with spring and my aspect is
external.

Why i need load time weaving ? wath's the difference bitween Equinox weavin and other kind of load time weaving ?


thanks for your informations.
Re: stop bundle osgi using Aspectj advice [message #664578 is a reply to message #664388] Mon, 11 April 2011 09:29 Go to previous messageGo to next message
moha  is currently offline moha Friend
Messages: 43
Registered: March 2011
Member
Hi Andrew,

I installed AJDT in eclipse galileo , and i tried to integrate Aspectj
with spring and worked with load-time_weaving .I developped
2 separate OSGI bundle (my aspect is external) . I imported aspectjrt.jar and aspectjweaver and it doesn't work.

thanks for your help

[Updated on: Mon, 11 April 2011 09:36]

Report message to a moderator

Re: stop bundle osgi using Aspectj advice [message #664587 is a reply to message #664388] Mon, 11 April 2011 10:03 Go to previous messageGo to next message
moha  is currently offline moha Friend
Messages: 43
Registered: March 2011
Member
Hi,

I have created a new topic in Virgo project in order to attach my OSGI bundles (Because i can't attach files in this topic).

Thanks to read my message in Virgo Project.
Re: stop bundle osgi using Aspectj advice [message #664686 is a reply to message #664587] Mon, 11 April 2011 15:28 Go to previous messageGo to next message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
You need to use Equinox weaving because standard load time weaving does not work in an OSGi environment. Since OSGi uses separate classloaders for each bundle you need to associate a weaver with each bundle. This can be done quite easily by including the Equinox weaving bundles as well as the AspectJ bundles in your project and augmenting your manifests for your aspect bundles. A quick start guide is here:

http://www.eclipse.org/equinox/incubator/aspects/

Re: stop bundle osgi using Aspectj advice [message #664691 is a reply to message #664686] Mon, 11 April 2011 15:39 Go to previous message
moha  is currently offline moha Friend
Messages: 43
Registered: March 2011
Member
thanks Andrew,

i tried the example gived by th e quick start guide it works fine with the gived target (aspectj 1.6.1 ......Wink ,However it doesn't work if i use aspectj 1.6.10 .

any idea???

other question : can i use Eclipse equinox with Aspectj and spring ??

thanks in advance
Previous Topic:Virgo + Spring + ASPECTJ (load time weaving)
Next Topic:How to convert a Visio .vsd to Eclipse UML format??
Goto Forum:
  


Current Time: Fri Apr 19 04:15:27 GMT 2024

Powered by FUDForum. Page generated in 0.02094 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top