[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[equinox-dev] Equinox aspects: Several problems for Load-Time-Weaving in a eclipse product!
I have downloaded the equinox aspectj extension and integrated into eclipse
how it is mentioned in the user guide.
The hello world aspectj example works great for me. I can dynamically start
and stop the aspectj service and the classes seam to be reloading at
I have zipped the folders org.aspectj.runtime_18.104.22.16880703120000 and
org.eclipse.equinox.weaving.demo.target) from the example to two jar files
and copied it to the eclipse plugins directory. I reloaded the target
platform, so the plugins are considered.
After playing with some examples, I tried to integrate aspects into our
eclipse product which is based on 3.4.1. I have created a config.ini
(modified the prebaked config.ini of eclipse export mechanism) which looks
like this one:
# default start level for the bundles
org.eclipse.equinox.weaving.caching@2\:start, com.ibm.icu, [our bundles],
After configuring it there are two problems:
1. If I start the product configuration via eclipse, I can see following in
the osgi console after running ss:
4 <<LAZY>> org.eclipse.equinox.weaving.aspectj_22.214.171.124808061839
5 <<LAZY>> org.eclipse.equinox.weaving.caching.j9_126.96.36.199808061839
The two bundles for aspectj are not active after starting the osgi platform.
I donÂt know why! Something prevents loading the aspectj bundles. My
presumption is that the required bundles
org.aspectj.weaver_188.8.131.5280703120000.jar are loaded to late from the
org.eclipse.update.configurator which loads all bundles from the plugins
directory. Or anyboday think there is another problem?
After starting the two bundles manually with start [bundle-ids], my trace
aspect which traces method calls is working for this session. But how I can
deactivate it during runtime? I made a stop for the bundle 4
(org.eclipse.equinox.weaving.aspectj_184.108.40.206808061839) and the main
Activator of our application will be stopped!!! I thought I can dynamically
start and stop the aspect bundle?
Another approach was to stop the bundle with the compiled aspect inside. But
it does not work, too. The tracing still is working. I think, the aspect is
cached... Can I prevent this?
2. I made a shutdown of the ogsi plattform and there are two different
2.1 If I restart the product WITHOUT the parameter osgi.clean=true, the
needed bundles are started:
4 ACTIVE org.eclipse.equinox.weaving.aspectj_220.127.116.11808061839
5 ACTIVE org.eclipse.equinox.weaving.caching.j9_18.104.22.168808061839
6 ACTIVE org.eclipse.equinox.weaving.caching_22.214.171.124808061839
My bundle with the aspect is also active. But I get severeal messages on
console which are like this one: "Info no configuration found. Disabling
weaver for bundler [...]".
I think, the aspect in one of my bundles cannot be found. At all, the trace
aspect does not work!
2.2 If I restart the product WITH the parameter osgi.clean=true, I have the
same situation as mentioned under point 1! The required bundles are not
What does it mean to me? I have always to start the osgi platform with
osgi.clean=true, so in this case I cannot have the advantage of osgi
caching. At all, we cannot rely on the equinox aspects. Maybe somebody can
help me to fix the problem.
View this message in context: http://www.nabble.com/Equinox-aspects%3A-Several-problems-for-Load-Time-Weaving-in-a-eclipse-product%21-tp20774467p20774467.html
Sent from the Equinox - Dev mailing list archive at Nabble.com.