[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: AOPConstructorJoinpoint and methodHasSubInstanceMetaData

kabir.khan@jboss.com do-not-reply at jboss.com
Thu Jul 24 06:01:45 EDT 2008


Setting a breakpoint in AnnotatedElementLoader, it fails on 

  | Method with signature get[int] does not exist on class org.jboss.wsf.framework.deployment.EndpointRecordProcessorDeploymentAspect
  | 

The stacktrace is:

  | Thread [main] (Suspended (breakpoint at line 150 in AnnotatedElementMetaDataLoader))	
  | 	AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(Signature) line: 150	
  | 	AbstractMetaDataContext.getComponentMetaDataRetrieval(Signature) line: 276	
  | 	MetaDataRetrievalToMetaDataBridge.getComponentMetaData(Signature) line: 160	
  | 	AOPConstructorJoinpoint.methodHasSubInstanceMetaData(MetaData, MethodInfo) line: 171	
  | 	AOPConstructorJoinpoint.rootHasMethodWithSubInstanceMetaData(MetaData) line: 149	
  | 	AOPConstructorJoinpoint.rootHasSubInstanceMetaData(MetaData) line: 129	
  | 	AOPConstructorJoinpoint.dispatch() line: 92	
  | 	AbstractListMetaData(AbstractTypeMetaData).createInstance(TypeInfo, ClassLoader, Class<T>, boolean) line: 251	
  | 	AbstractListMetaData(AbstractTypeMetaData).getTypeInstance(TypeInfo, ClassLoader, Class<T>, boolean) line: 292	
  | 	AbstractListMetaData(AbstractTypeMetaData).getTypeInstance(TypeInfo, ClassLoader, Class<T>) line: 271	
  | 	AbstractListMetaData(AbstractCollectionMetaData).getValue(TypeInfo, ClassLoader) line: 109	
  | 	PropertyDispatchWrapper.execute() line: 87	
  | 	PropertyDispatchWrapper(ExecutionWrapper).execute(AccessControlContext) line: 47	
  | 	KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContext, ExecutionWrapper) line: 109	
  | 	ConfigureAction.dispatchSetProperty(KernelControllerContext, PropertyMetaData, boolean, BeanInfo, Object, ClassLoader) line: 109	
  | 	ConfigureAction.setAttributes(KernelControllerContext, Object, BeanInfo, BeanMetaData, boolean) line: 87	
  | 	ConfigureAction.installActionInternal(KernelControllerContext) line: 44	
  | 	ConfigureAction(InstallsAwareAction).installAction(KernelControllerContext) line: 54	
  | 	ConfigureAction(InstallsAwareAction).installAction(ControllerContext) line: 42	
  | 	ConfigureAction(SimpleControllerContextAction<T>).simpleInstallAction(T) line: 62	
  | 	ConfigureAction(AccessControllerContextAction<S,T>).install(ControllerContext) line: 71	
  | 	KernelControllerContextActions(AbstractControllerContextActions).install(ControllerContext, ControllerState, ControllerState) line: 51	
  | 

Going back to AOPConstructorJoinPoint, the contained constructorInfo is public java.util.ArrayList(), so it is iterating over ArrayList's methods. However, looking at KernelControllerContextActions the installed bean is of type org.jboss.wsf.framework.deployment.EndpointRecordProcessorDeploymentAspect:

  | AbstractKernelControllerContext at cd8e39{ metadata=AbstractBeanMetaData at e6750f{name=WSNativeEndpointRecordProcessorDeploymentAspect bean=org.jboss.wsf.framework.deployment.EndpointRecordProcessorDeploymentAspect properties=[mbeanServer, processors, requires, provides] constructor=null autowireCandidate=true}name=WSNativeEndpointRecordProcessorDeploymentAspect target=org.jboss.wsf.framework.deployment.EndpointRecordProcessorDeploymentAspect at 9d0863 state=Instantiated depends=AbstractDependencyInfo at 91cb98{idependOn=[AbstractDependencyItem at 1de5b9{name=WSNativeEndpointRecordProcessorDeploymentAspect dependsOn=WSMBeanServerLocator whenRequired=Configured resolved=true}, AbstractDependencyItem at d4f822{name=WSNativeEndpointRecordProcessorDeploymentAspect dependsOn=WSMemoryBufferRecorder whenRequired=Configured resolved=true}, AbstractDependencyItem at ee97af{name=WSNativeEndpointRecordProcessorDeploymentAspect dependsOn=WSLogRecorder whenRequired=Configured resolved=true}] unresolved=[AbstractDependencyItem at 1de5b9{name=WSNativeEndpointRecordProcessorDeploymentAspect dependsOn=WSMBeanServerLocator whenRequired=Configured resolved=true}, AbstractDependencyItem at d4f822{name=WSNativeEndpointRecordProcessorDeploymentAspect dependsOn=WSMemoryBufferRecorder whenRequired=Configured resolved=true}, AbstractDependencyItem at ee97af{name=WSNativeEndpointRecordProcessorDeploymentAspect dependsOn=WSLogRecorder whenRequired=Configured resolved=true}]}}
  | 

So it would seem that when creating the properties for the bean, it uses the MetaData for the bean, which does not contain the methods for the properties. Maybe we need to call MetaDataStack.mask() as part of ConfigureAction.setAttributes()?



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

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




More information about the jboss-dev-forums mailing list