-
1. Re: Passing MetaData to AOPConstructorJoinPoint
adrian.brock Jul 24, 2008 8:45 AM (in response to adrian.brock)Previously we had a bizarre method on BeanInfo/ClassAdapter
which passed an opaque object (which was the MetaData)
but this was also very hacky.
Maybe we just need an extra method on the JoinpointFactory
something like:/** * Get a constructor join point * * @param constructorInfo the constructor info * @param metaData an opaque object * @return the constructor join point * @throws JoinpointException when no such constructor */ ConstructorJoinpoint getConstructorJoinpoint(ConstructorInfo constructorInfo, Object metaData) throws JoinpointException;
which InstantiateAction can use to pass the MetaData instead of the MetaDataStack.
This at least hides the ugliness from the main api and doesn't interfere with other uses
fo ConstructorJoinpoints that use the original method. -
2. Re: Passing MetaData to AOPConstructorJoinPoint
adrian.brock Jul 25, 2008 5:59 AM (in response to adrian.brock)I've implemented my suggestion, so now the MetaData is passed
explicitly to the constructor joinpoint when required.
This means we no longer rely on the MetaDataStack to pass the MetaData
(it's still there for other reasons), so there's no need to do the masking. -
3. Re: Passing MetaData to AOPConstructorJoinPoint
adrian.brock Jul 25, 2008 6:00 AM (in response to adrian.brock)I also changed the LazyInitializer to pass in MetaData object,
but I don't know whether it works since I couldn't find a test for the AOP version? -
4. Re: Passing MetaData to AOPConstructorJoinPoint
adrian.brock Jul 25, 2008 6:09 AM (in response to adrian.brock)NOTE: Fixing this knocked off about 2-3 seconds on the JBoss bootstrap
I doubt this was just caused by the spurious NoSuchMethodExceptions getting
constructed, so it was showing a large overhead checking whether the JBossXB
constructed objects needed AOP proxies.