Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Trying to put AOSGI to work on the framework
Trying to put AOSGI to work on the framework [message #105077] Tue, 12 February 2008 15:53 Go to next message
Eclipse UserFriend
Originally posted by: sd-silva.criticalsoftware.com

Hi,

I'm trying get AOSGi to work outside eclipse, just
the equinox framework with the necessary bundles, but I'm not getting good
results.

My major question is, which bundles should be on config.ini to be able to
run successfully.

Cheers,
Re: Trying to put AOSGI to work on the framework [message #105322 is a reply to message #105077] Sun, 17 February 2008 13:05 Go to previous messageGo to next message
Martin Lippert is currently offline Martin LippertFriend
Messages: 124
Registered: July 2009
Senior Member
Hi!

> I'm trying get AOSGi to work outside eclipse, just
> the equinox framework with the necessary bundles, but I'm not getting
> good results.
>
> My major question is, which bundles should be on config.ini to be able
> to run successfully.

The config.ini could be something like this:

osgi.bundles=org.eclipse.equinox.common@2\:start,org.eclipse.update.configurator@3\:start,org.eclipse.core.runtime@start,
org.aspectj.osgi.service.weaving@:start,
org.aspectj.osgi.service.caching.j9@:start

(where the last one only makes sense if you are using an IBM SDK with
shared classes feature enabled).
(this is all in one line, my mail client breaks this into multiple ones)

Don't forget to set the framework extension property.

For example:
osgi.framework.extensions=org.aspectj.osgi

And the loadtime weaving configuration to those paths that you are using
for the aop.xml files in your aspect bundles:

For example:
org.aspectj.weaver.loadtime.configuration=META-INF/aop.xml;o rg/aspectj/aop.xml;META-INF/aop-ajc.xml

If you have further questions, please feel free to ask. I remember a
similar question on the mailing list some time ago. If I find the link,
I will post it here.

HTH,
-Martin
Re: Trying to put AOSGI to work on the framework [message #105336 is a reply to message #105322] Mon, 18 February 2008 11:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sd-silva.criticalsoftware.com

Thanks for your help,

But when i added the org.aspectj.osgi.service.weaving to the config.ini
file and run the osgi server, a missing constraint is raised on that
bundle, refering that org.aspectj.weaver is needed.

Trying to fix the problem, i add a org.aspectj.aspectjweaver bundle, but
it didn't solve the problem.


Then i created a new bundle with the org.aspectj.osgi.service.weaving and
the org.aspectj.aspectjweaver inside. It doesn't gave me an error, but
aspectj continues not to work.

Any ideas ???
Re: Trying to put AOSGI to work on the framework [message #105350 is a reply to message #105336] Mon, 18 February 2008 16:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sd-silva.criticalsoftware.com

Just to let you know, i've managed a solution and i get AOSGI to work :)

Thanks for your help :)
Re: Trying to put AOSGI to work on the framework [message #105363 is a reply to message #105350] Mon, 18 February 2008 18:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sd-silva.criticalsoftware.com

Another thing...

It's possible to have a bundle with all aspectj pointcuts defined and
that will catch any other call done in another bundle. I just can do
that inside each bundle, not in all environment.

Cheers,


Mr. Smith wrote:
> Just to let you know, i've managed a solution and i get AOSGI to work :)
>
> Thanks for your help :)
>
Re: Trying to put AOSGI to work on the framework [message #105419 is a reply to message #105336] Thu, 21 February 2008 20:03 Go to previous messageGo to next message
Martin Lippert is currently offline Martin LippertFriend
Messages: 124
Registered: July 2009
Senior Member
Mr. Smith wrote:
> Thanks for your help,
>
> But when i added the org.aspectj.osgi.service.weaving to the config.ini
> file and run the osgi server, a missing constraint is raised on that
> bundle, refering that org.aspectj.weaver is needed.
> Trying to fix the problem, i add a org.aspectj.aspectjweaver bundle, but
> it didn't solve the problem.
>
> Then i created a new bundle with the org.aspectj.osgi.service.weaving
> and the org.aspectj.aspectjweaver inside. It doesn't gave me an error,
> but aspectj continues not to work.

The bundle org.aspectj.weaver is part of the AJDT distribution. Take it
from there, if you haven't already installed AJDT or if AJDT is not part
of your target platform.

HTH,
-Martin
Re: Trying to put AOSGI to work on the framework [message #105434 is a reply to message #105363] Thu, 21 February 2008 20:08 Go to previous message
Martin Lippert is currently offline Martin LippertFriend
Messages: 124
Registered: July 2009
Senior Member
Hi!

> It's possible to have a bundle with all aspectj pointcuts defined and
> that will catch any other call done in another bundle. I just can do
> that inside each bundle, not in all environment.

I am not sure if I understand your question correctly but it is possible
to define an aspect inside a separate bundle and let this aspect be
woven into all other bundles with Equinox Aspects. This means your
aspect bundle can define a pointcut that affects all other bundles
without touching those other bundles at all.

Just implement your aspect inside a bundle, define the aop.xml file and
"Eclipse-SupplementBundle: *" in the manifest. Thats it.

Hope this answers your question,
Martin




>
> Cheers,
>
>
> Mr. Smith wrote:
>> Just to let you know, i've managed a solution and i get AOSGI to work :)
>>
>> Thanks for your help :)
>>
Previous Topic:SOAP on Equinox
Next Topic:-osgi.bundles not processed in command line
Goto Forum:
  


Current Time: Thu Apr 19 12:10:38 GMT 2018

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

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