Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Re: [Bug 55107] add removeLibraryAspect method to weaver

Hi,

This is not exactly the thing that I am doing right now. If an aspect is
uninstalled from the system, all plugins that are affected by this
aspect (plugins that have loaded classes which were woven with this
aspect at load-time) will be unresolved and re-resolved. That means,
that their complete code will be re-loaded into the VM (all objects are
thrown away, new classloader created, state recreated). I remove the
aspect from the world after the plugin is unresolved and before it is
re-resolved. That means that when the plugin is reloaded, it is reloaded
completely with the new set of aspects (as all other plugins that are
affected by the aspect). Using this mechanism the set of aspects is
completely stable during the lifetime of a plugin.

Good. In which case I don't think you need the "removeAspectLibrary()"
enhancement. Each BcelWorld and accompanying BcelWeaver should have the
lifetime of a single class loader. It cannot be associated with another
one.

Yes, agree on that. I am just too lazy to create and initialize a new one. ;-)

I suspect you rationale for reusing the world and simply changing the
set of aspects associated with it stems from the fact that they currently
seem quite "heavy". I hope to address this in the longer term for LTW by
using run-time rather than byte-code type resolution, something that will
be needed to reduce the footprint in large systems with multiple weaving
class loaders.

That sounds like a great thing. Would that be possible with the current weaver implementation or do you need to reimplement parts of that because of the BCEL dependencies?

BTW: I am currently using a specialized version of BcelWorld which enhances the "lookupJavaClass" method. My implementation first calls the super class and then tries to load the bytecode of the class via getResource using the class loader. Using this mechamism I do not need to set the complete classpath to my BcelWorld (which would be quite complicated using the Eclipse 3.0 runtime model). What do you think about an interface for this class lookup?

Cheers,
Martin

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Back to the top