[jboss-dev-forums] [Design of POJO Server] - Re: Integrating aop-mc-int bean metadata with AS5

kabir.khan@jboss.com do-not-reply at jboss.com
Wed Aug 13 07:52:53 EDT 2008


Seems it was getting confused about the scopes. In the standalone version, the Bean MetaData annotations are added to the mutable scope by

  | [INSTANCE=SomeRandomName]
  | 

In the AS version the mutable scope was

  | [APPLICATION=vfszip:/Users/kabir/sourcecontrol/jboss-head/testsuite/output/lib/aop-scopeddependency-scoped.sar, INSTANCE=ScopedAlias_17_Factory$ScopedInterceptor]
  | 

When calling BasicKernelMetaDataRepository.getMetaData() with the context's scope

  | [JVM=THIS, CLASS=class org.jboss.aop.asintegration.jboss5.ScopedVFSClassLoaderDomain, INSTANCE=ScopedManager_4_vfszip:/Users/kabir/sourcecontrol/jboss-head/testsuite/output/lib/aop-scopeddependency-scoped.sar]
  | 
the returned MetaData does not contain the added annotations in AS.

Modifying the code I copied from BeanMetaDataDeployer to 

  |          KernelControllerContext context = new AbstractKernelControllerContext(null, deployment, null);
  |          //Make sure that the metadata from the deployment gets put into the context
  |          ScopeInfo scopeInfo = context.getScopeInfo();
  |          if (scopeInfo != null)
  |          {
  |             mergeScopes(scopeInfo.getScope(), unit.getScope());
  |             //mergeScopes(scopeInfo.getMutableScope(), unit.getMutableScope());
  |          }
  |          
  |          try
  |          {
  |             controller.install(context);
  |          }
  | 
So that the scope is simply

  | [INSTANCE=ScopedAlias_17_Factory$ScopedInterceptor]
  | 
seems to get the aliases installed.
So that the alias is

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

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



More information about the jboss-dev-forums mailing list