-
1. Re: Intercepting ManagedComponent ctor
alesj Apr 24, 2009 1:19 PM (in response to starksm64)You could pre-aspectize them?
btw: I don't this you should mix the profileservice code/config with aop's
--> aspect and binding should be in profile.xml -
2. Re: Intercepting ManagedComponent ctor
starksm64 Apr 24, 2009 2:25 PM (in response to starksm64)"alesj" wrote:
You could pre-aspectize them?
btw: I don't this you should mix the profileservice code/config with aop's
--> aspect and binding should be in profile.xml
I would if this was working. I was trying to load the aspects as soon as possible to see if it could be applied without having to compile the aspects in. -
3. Re: Intercepting ManagedComponent ctor
kabirkhan Apr 27, 2009 8:09 AM (in response to starksm64)When/how is ManagedComponentImpl instantiated and intercepted?
IIRC you used to do this with AOP proxies? If that is the case you need to invoke the constructor aspects yourself as is done for MC beans in AOPConstructorJoinPointprivate Object createTarget(ContainerCache cache, AOPProxyFactoryParameters params) throws Throwable { Advisor advisor = cache.getAdvisor(); if (advisor != null) { org.jboss.aop.ConstructorInfo aopinfo = findAopConstructorInfo(advisor); Interceptor[] interceptors = (aopinfo != null) ? aopinfo.getInterceptors() : null; if (interceptors != null) { ConstructorInvocation inv = new ConstructorInvocation(aopinfo, aopinfo.getInterceptors()); inv.setArguments(getArguments()); return inv.invokeNext(); } ...
-
4. Re: Intercepting ManagedComponent ctor
starksm64 Apr 28, 2009 10:11 AM (in response to starksm64)The first call to a ManagedComponentImpl would be after the various bootstrap kernel deployments (bootstrap/*.xml of jboss AS) have been deployed and the ProfileServiceBootstrap runs. However, this class is referenced by a number of MC classes, so I'm not sure when its first loaded. Its probably when the bootstrap/deployers.xml ManagedObjectFactory bean is instantiated.
Before another MainDeployer aspect was creating some of the ManagedObjects. That code is gone now.
The question is whether I should be able to have an aspect in one of the bootstrap/*.xml deployments applied to the ManagedComponentImpl ctor?