Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Re: Eclipse Aspects

Hi,

That's indeed good news!

The difference in logging behaviour comes from the fact that Equinox Aspects applies load-time-weaving. Therefore weaving has nothing to do with starting or stopping bundles but with loading classes into the VM. When you start your bundle for the first time the classes are loaded and woven.

Caching indeed is optional. You should consider using the caching in production when you start and stop the framework (Equinox) often. Caching will store woven types and try to get them from the cache each time they are loaded.

You are right: If you want to supplement more than one bundle you have to separate these by comma.

Cheers
Heiko

Am 12.06.2008 um 12:14 schrieb Rowan Limb:

Heiko,

more good news!

I think I've sorted it. If I change the header in the MANIFEST file

from this:

Eclipse-SupplementBundle: *

to this:

Eclipse-SupplementBundle: simple*

then both the problems I listed in previous email go away. ie I can
close and restart the equinox framework without getting the EOF
exception

AND I can start the simplebundle and the aspects work every time.

One thing to note:

The VERY FIRST time I start the simplebundle I get this on starting it:

[org.aspectj.osgi.service.weaving] info weaving bundle 'simplebundle'
[simplebundle] weaveinfo Join point 'constructor-call(void
simple.Simple.<init>())' in Type 'simple.Activator' (Activator.java: 11)
advised by afterReturning advice from
'hooktest.MyAspects' (MyAspects.aj:21)
[simplebundle] weaveinfo Join point 'method-call(void
simple.Simple.println())' in Type 'simple.Activator' (Activator.java: 12)
advised by before advice from 'hooktest.MyAspects' (MyAspects.aj:17)
[simplebundle] weaveinfo Join point 'constructor-call(void
simple.Simple.<init>())' in Type 'simple.Simple' (Simple.java:25)
advised by afterReturning advice from
'hooktest.MyAspects' (MyAspects.aj:21)
[simplebundle] weaveinfo Join point 'method-call(void
simple.Simple.println())' in Type 'simple.Simple' (Simple.java:25)
advised by before advice from 'hooktest.MyAspects' (MyAspects.aj:17)
[org.aspectj.osgi.service.weaving] info weaving bundle 'hooktest'
advice after Simple constructor
Before Simple println()
A simple bundle!

Thereafter, if I stop/start it I only get this:

advice after Simple constructor
Before Simple println()
A simple bundle!

ie it looks like the verbose options only work once for each framework
start - I get it once again if I close and re-start the framework.

I also do not know what the org.aspectj.osgi.service.caching does. My
example seems to work with and without it.

Looks like I have a way forward. If you have any time to explain what is
going on / why this works, I'd appreciate it.

I would also like some documentation on this header. eg can I have
multiple packages (I assume comma separated)?

Rowan





Back to the top