[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Metadata rewrite

adrian@jboss.org do-not-reply at jboss.com
Wed Dec 13 19:07:36 EST 2006


I've committed the code for this refactoring

AOP-CHANGES

It required a change to the AOP advisor to map MetaDataContext -> MetaData
I left the old class still in the repository in case somebody does a partial
integration (don't want NoClassDefFoundError).

I hope I didn't break anything, the aop-mc-int tests weren't in a good shape
(e.g. all the weave tests were broken).

KNOWN TEST ISSUE (Metadata stack)

We'll actually I know I broke one thing, but that would be easily fixed if
we decide it isn't a useful feature.
Basically when I callout to a joinpoint I push the metadata onto the
org.jboss.metadata.spi.MetaDataStack
this is how I pass the MetaData to aop,
but it also means the constructor or lifecycle methods can peek
the metadata.

However, this seems to confuse AOP since the lazily loaded aspects
also seem to pick up this metadata.
For now I'm "masking" this stack in the AOPConstructorJoinpoint
but that means some of the new tests are failing because the constructor
expects to be able to peek the stack.

Maybe this isn't such a good idea and it should be a feature provided
optionally by an interceptor at runtime?

ANNOTATION SUPPORT

The new MetaData has support for all types of annotations
(field, constructor, method, method parameters - in fact whatever
you can think of as a "Signature"), but the MC xml still doesn't support
overrriding all these.

DEFINING SCOPES

The major piece of work that is left is to replace the
BasicKernelMetaDataRepository.initMetaData()
with something that knows how to properly construct scoped metadata contexts.
This is going to require some kind of "plugin' mechanism away from the
MC since this is likely to get very JBossAS specific, e.g.
clustering or transaction local scopes.

The only scopes currently supported are hardwired:
instance, class and JVM

REPOSITORY.JBOSS.COM

Finally, I put this in the repository as "snapshot-metadata" because
I don't want the JBossAS build picking this up until Kabir has had a chance
to verify it.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993638#3993638

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993638



More information about the jboss-dev-forums mailing list