[jboss-dev] missing security config file?

Ales Justin ales.justin at gmail.com
Fri Aug 8 04:46:03 EDT 2008


I've added this scopes merge to BeanMetaDataDeployer.

       KernelControllerContext context = new 
AbstractKernelControllerContext(null, deployment, null);
       ScopeInfo scopeInfo = context.getScopeInfo();
       if (scopeInfo != null)
       {
          mergeScopes(scopeInfo.getScope(), unit.getScope());
          mergeScopes(scopeInfo.getMutableScope(), unit.getMutableScope());
       }
       try
       {
          controller.install(context);
       }
       catch (Throwable t)
       {
          throw DeploymentException.rethrowAsDeploymentException("Error 
deploying: " + deployment.getName(), t);
       }
    }

    /**
     * Merge scope keys.
     *
     * @param contextKey the context key
     * @param unitKey the unit key
     */
    protected static void mergeScopes(ScopeKey contextKey, ScopeKey unitKey)
    {
       if (contextKey == null)
          return;
       if (unitKey == null)
          return;

       Collection<Scope> unitScopes = unitKey.getScopes();
       if (unitScopes == null || unitScopes.isEmpty())
          return;

       for (Scope scope : unitScopes)
          contextKey.addScope(scope);
    }

The JBossAS5_trunk now boots fine with all MC snapshots.
My demos also work. :-)

But I haven't closed JBDEPLOY-69 yet.
Any other corner case we can think of?

Ales Justin wrote:
> This is cause by:
>  - 
> http://fisheye.jboss.org/browse/JBossAS/projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/deployer/kernel/BeanMetaDataDeployer.java?r1=75281&r2=76637 
> 
>  - https://jira.jboss.org/jira/browse/JBDEPLOY-69
> 
> It messes up the Scopes + MetaDataRetrievals.
> So the Pojo IoC annotations are not found.
> In this case it's the @Create, @Start, ... on ServiceSupportMBean.
> 
> I ported the security example here:
>  - 
> http://anonsvn.jboss.org/repos/jbossas/projects/demos/trunk/models/src/main/org/jboss/demos/models/ 
> 
> 
> It was failing with the JBDEPLOY-69.
> This annotated bean also had problems, not finding the marked constructor:
>  - 
> http://anonsvn.jboss.org/repos/jbossas/projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/PojoModule.java 
> 
> Removing JBDEPLOY-69 patch, made things work again.
> 
> So, JBDEPLOY-69 is now re-opened.
> Expecting better tests. :-)



More information about the jboss-development mailing list