Package org.jboss.kernel.spi.metadata

Examples of org.jboss.kernel.spi.metadata.KernelMetaDataRepository


         tracker = new NoopContextTracker();
   }

   public void start()
   {
      KernelMetaDataRepository kmdr = kernel.getMetaDataRepository();
      MutableMetaDataRepository repository = kmdr.getMetaDataRepository();
      MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(ScopeKey.DEFAULT_SCOPE);
      if (retrieval == null)
      {
         retrieval = new MemoryMetaDataLoader(ScopeKey.DEFAULT_SCOPE);
         repository.addMetaDataRetrieval(retrieval);
View Full Code Here


      }
   }

   public void stop()
   {
      KernelMetaDataRepository kmdr = kernel.getMetaDataRepository();
      MutableMetaDataRepository repository = kmdr.getMetaDataRepository();
      MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(ScopeKey.DEFAULT_SCOPE);
      if (retrieval != null && retrieval instanceof MutableMetaData)
      {
         MutableMetaData mmd = (MutableMetaData)retrieval;
         mmd.removeMetaData(ContextTracker.class);
View Full Code Here

   {
   }
  
   public void initKernel(Kernel kernel) throws Throwable
   {
      KernelMetaDataRepository metaDataRepository = createKernelMetaDataRepository(kernel);
      if (trace)
         log.trace("Using MetaDataRepository: " + metaDataRepository);
      kernel.setMetaDataRepository(metaDataRepository);

      org.jboss.kernel.spi.registry.KernelRegistry registry = createKernelRegistry(kernel);
View Full Code Here

         AbstractKernelControllerContext theContext = (AbstractKernelControllerContext) context;
         access = theContext.getAccessControlContext();
      }

      KernelController controller = (KernelController) context.getController();
      KernelMetaDataRepository repository = controller.getKernel().getMetaDataRepository();
      MetaData md = repository.getMetaData(context);
      if (md != null)
         MetaDataStack.push(md);
      else
         staticLog.warn("NO METADATA! for " + context.getName() + " with scope " + context.getScopeInfo().getScope());
      try
View Full Code Here

         Controller controller = context.getController();
         if (controller instanceof KernelController == false)
            throw new IllegalArgumentException("Can only handle kernel controller: " + controller);

         KernelController kernelController = (KernelController)controller;
         KernelMetaDataRepository repository = kernelController.getKernel().getMetaDataRepository();

         MutableMetaDataRepository mmdr = repository.getMetaDataRepository();
         MetaDataRetrieval mdr = mmdr.getMetaDataRetrieval(scopeKey);
         if (mdr == null)
            throw new IllegalArgumentException("No metadata retrieval for scope: " + scopeKey);

         MetaDataItem<ScopedKernelController> controllerItem = mdr.retrieveMetaData(ScopedKernelController.class);
View Full Code Here

   }
   */

   public void start()
   {
      KernelMetaDataRepository kmdr = underlyingKernel.getMetaDataRepository();
      MutableMetaDataRepository mmdr = kmdr.getMetaDataRepository();
      ScopeKey scopeKey = new ScopeKey(scopes);
      MetaDataRetrieval retrieval = mmdr.getMetaDataRetrieval(scopeKey);
      // Not found create it
      if (retrieval == null)
      {
View Full Code Here

      }
   }

   public boolean check(KernelControllerContext context, String annotation)
   {
      KernelMetaDataRepository repository = kernel.getMetaDataRepository();
      MetaData retrieval = repository.getMetaData(context);
      if (retrieval != null)
      {
         Annotation[] annotations = retrieval.getAnnotations();
         if (annotations != null && annotations.length > 0)
         {
View Full Code Here

         Controller controller = context.getController();
         if (controller instanceof AbstractKernelController == false)
            throw new IllegalArgumentException("Can only handle AbstractKernelController: " + controller);

         AbstractKernelController kernelController = (AbstractKernelController)controller;
         KernelMetaDataRepository repository = kernelController.getKernel().getMetaDataRepository();
         MutableMetaDataRepository mmdr = repository.getMetaDataRepository();
         AbstractController abstractController = ScopeHierarchyBuilder.buildControllerHierarchy(kernelController, mmdr, scopeKey);
         if (abstractController instanceof ScopedKernelController == false)
            throw new IllegalArgumentException("Should be ScopedKernelController instance: " + abstractController);

         ScopedKernelController scopedController = (ScopedKernelController)abstractController;
View Full Code Here

         Controller controller = context.getController();
         if (controller instanceof KernelController == false)
            throw new IllegalArgumentException("Can only handle kernel controller: " + controller);

         KernelController kernelController = (KernelController)controller;
         KernelMetaDataRepository repository = kernelController.getKernel().getMetaDataRepository();

         // find scoped controller
         MutableMetaDataRepository mmdr = repository.getMetaDataRepository();
         ScopeHierarchyBuilder.cleanControllerHierarchy(mmdr, scopeKey, context);
      }
   }
View Full Code Here

      if (info != null)
      {
         KernelController controller = (KernelController)context.getController();
         KernelConfig config = controller.getKernel().getConfig();
         DependencyBuilder dependencyBuilder = config.getDependencyBuilder();
         KernelMetaDataRepository repository = controller.getKernel().getMetaDataRepository();
         MetaData md = repository.getMetaData(context);
         // add custom dependencies (e.g. AOP layer).
         List<DependencyBuilderListItem> dependencies = dependencyBuilder.getDependencies(info, md);
         if (log.isTraceEnabled())
            log.trace("Extra dependencies for " + context.getName() + " " + dependencies);
         if (dependencies != null && dependencies.isEmpty() == false)
View Full Code Here

TOP

Related Classes of org.jboss.kernel.spi.metadata.KernelMetaDataRepository

Copyright © 2018 www.massapicom. 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.