Examples of ScopeInfo


Examples of org.jboss.dependency.spi.ScopeInfo

         {
            log.debugf("Unable to retrieve classloader for deployment: %1s reason=%2s", unit.getName(), e);
         }
      }
      KernelControllerContext context = createControllerContext(unit, deployment);
      ScopeInfo scopeInfo = context.getScopeInfo();
      scopeInfo.setScope(unit.getScope());
      scopeInfo.setMutableScope(unit.getMutableScope());
     
      try
      {
         controller.install(context);
         putContext(context, unit.getParent()); // we're a component, use parent
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

         {
            log.debug("Unable to retrieve classloader for deployment: " + unit.getName() + " reason=" + e.toString());
         }
      }
      KernelControllerContext context = createControllerContext(unit, deployment);
      ScopeInfo scopeInfo = context.getScopeInfo();
      scopeInfo.setScope(unit.getScope());
      scopeInfo.setMutableScope(unit.getMutableScope());
     
      try
      {
         controller.install(context);
         putContext(context, unit.getParent()); // we're a component, use parent
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

         {
            log.debug("Unable to retrieve classloader for deployment: " + unit.getName() + " reason=" + e.toString());
         }
      }
      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);
      }
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

   }

   public void addMetaData(ControllerContext context)
   {
      MutableMetaDataRepository repository = getMetaDataRepository();
      ScopeInfo scopeInfo = context.getScopeInfo();
      scopeInfo.addMetaData(repository, context);
   }
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

   }

   public void removeMetaData(ControllerContext context)
   {
      MutableMetaDataRepository repository = getMetaDataRepository();
      ScopeInfo scopeInfo = context.getScopeInfo();
      scopeInfo.removeMetaData(repository, context);
   }
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

    * @return the retrieval
    */
   protected MetaDataRetrieval initMetaDataRetrieval(ControllerContext context)
   {
      MutableMetaDataRepository repository = getMetaDataRepository();
      ScopeInfo scopeInfo = context.getScopeInfo();
      return scopeInfo.initMetaDataRetrieval(repository, context);
   }
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

    * @param context the context
    * @return install scope key
    */
   protected ScopeKey getScopeKey(ControllerContext context)
   {
      ScopeInfo scopeInfo = context.getScopeInfo();
      if (scopeInfo != null)
         return scopeInfo.getInstallScope();

      return null;
   }
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

            // update class scope with class info
            repository = kernel.getMetaDataRepository();
            // remove old context
            repository.removeMetaData(context);
            // create new scope key
            ScopeInfo scopeInfo = context.getScopeInfo();
            ScopeKey scopeKey = new ScopeKey(scopeInfo.getScope().getScopes());
            scopeKey.addScope(CommonLevels.CLASS, info.getClassInfo().getType());
            scopeInfo.setScope(scopeKey);
            // re-register
            repository.addMetaData(context);

            // handle custom annotations
            applyAnnotations(context);
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

  
   public void testPreconfiguredScope() throws Throwable
   {
      TestControllerContext test = new TestControllerContext("test");
     
      ScopeInfo scopeInfo = test.getScopeInfo();

      // Preconfigure the mutable scope
      ScopeKey mutable = scopeInfo.getMutableScope();
      MemoryMetaDataLoader loader = new MemoryMetaDataLoader(mutable);
      loader.addMetaData("Preconfigured", "testPreconfigured", String.class);
      repository.addMetaDataRetrieval(loader);
     
      // Setup the full scope
      ScopeKey scopeKey = scopeInfo.getScope();
      List<MetaDataRetrieval> retrievals = new ArrayList<MetaDataRetrieval>();
      for (Scope scope : scopeKey.getScopes())
      {
         ScopeKey thisScope = new ScopeKey(scope);
         MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(thisScope);
         if (retrieval == null)
            retrieval = new MemoryMetaDataLoader(thisScope);
         retrievals.add(0, retrieval);
      }
      MetaDataContext metaDataContext = new AbstractMetaDataContext(null, retrievals);
      repository.addMetaDataRetrieval(metaDataContext);
     
      try
      {
         controller.install(test);
        
         MetaData metaData = scopeInfo.getMetaData();
         assertNotNull(metaData);
        
         assertEquals("testPreconfigured", metaData.getMetaData("Preconfigured"));
         assertEquals("testFromInstall", metaData.getMetaData("FromInstall"));
      }
View Full Code Here

Examples of org.jboss.dependency.spi.ScopeInfo

  
   public void testNotPreconfiguredScope() throws Throwable
   {
      TestControllerContext test = new TestControllerContext("test");
     
      ScopeInfo scopeInfo = test.getScopeInfo();
      ScopeKey mutable = scopeInfo.getMutableScope();
      ScopeKey scopeKey = scopeInfo.getScope();
      try
      {
         controller.install(test);
        
         MetaData metaData = scopeInfo.getMetaData();
         assertNotNull(metaData);
         assertEquals("testFromInstall", metaData.getMetaData("FromInstall"));
      }
      finally
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.