Package org.jboss.dependency.spi

Examples of org.jboss.dependency.spi.DependencyInfo


         {
            info = configurator.getBeanInfo(object.getClass());
            context.setBeanInfo(info);
         }

         DependencyInfo dependencyInfo = context.getDependencyInfo();
         if (dependencyInfo != null && dependencyInfo.isAutowireCandidate())
            controller.addInstantiatedContext(context);
      }
      catch (Throwable t)
      {
         uninstall(context);
View Full Code Here


         {
//            if (object instanceof KernelControllerContextAware)
//               ((KernelControllerContextAware) object).unsetKernelControllerContext(context);

            KernelController controller = (KernelController) context.getController();
            DependencyInfo dependencyInfo = context.getDependencyInfo();
            if (dependencyInfo != null && dependencyInfo.isAutowireCandidate())
               controller.removeInstantiatedContext(context);
         }

      }
      catch (Throwable ignored)
View Full Code Here

      return accessContext;
   }

   private void removeClassContextReference()
   {
      DependencyInfo dependencyInfo = getDependencyInfo();
      if (dependencyInfo != null)
      {
         // remove all dependency items that hold class ref
         Set<DependencyItem> dependencys = dependencyInfo.getIDependOn(ClassContextDependencyItem.class);
         dependencys.addAll(dependencyInfo.getIDependOn(CallbackDependencyItem.class));
         for (DependencyItem di : dependencys)
         {
            // can cast because of getIDepend method impl
            ClassDependencyItem cdi = (ClassDependencyItem)di;
            cdi.clear(getController());
View Full Code Here

         Object name = attachment.getName();
         ControllerContext context = controller.getContext(name, null);
         if (context == null)
            context = createControllerContext(name, actions);
        
         DependencyInfo dependencyInfo = context.getDependencyInfo();
         Object dependency = attachment.getDependency();
         if (dependency != null)
         {
            DependencyItem item = createDependencyItem(name, dependency);
            dependencyInfo.addIDependOn(item);
         }
         try
         {
            if (attachment.isInstall())
               controller.install(context);
View Full Code Here

                     contextsInError.put(context.getName().toString(), getRootCause(context.getError()));
                  else
                  {
                     String name = context.getName().toString();
                     Set<MissingDependency> dependencies = new HashSet<MissingDependency>();
                     DependencyInfo dependsInfo = context.getDependencyInfo();
                     for (DependencyItem item : dependsInfo.getIDependOn(null))
                     {
                        if (item.isResolved() == false)
                        {
                           String dependency;
                           ControllerState actualState = null;
View Full Code Here

               buffer.append("\n*** DEPLOYMENTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}\n");
               for (Iterator i = incomplete.iterator(); i.hasNext();)
               {
                  KernelControllerContext ctx = (KernelControllerContext) i.next();
                  buffer.append(ctx.getName()).append(" -> ");
                  DependencyInfo dependsInfo = ctx.getDependencyInfo();
                  Set depends = dependsInfo.getIDependOn(null);
                  for (Iterator j = depends.iterator(); j.hasNext();)
                  {
                     DependencyItem item = (DependencyItem) j.next();
                     buffer.append(item.getIDependOn()).append('{').append(item.getWhenRequired().getStateString());
                     buffer.append(':');
View Full Code Here

         if (trace)
            log.trace("Installing " + context.toShortString());

         context.setController(this);
         DependencyInfo dependencies = context.getDependencyInfo();
         if (trace)
         {
            String dependsOn = "[]";
            if (dependencies != null)
            {
               try
               {
                  Set<DependencyItem> set = dependencies.getIDependOn(null);
                  if (set != null)
                     dependsOn = set.toString();
               }
               catch (Throwable t)
               {
View Full Code Here

      {
         for (ControllerContext ctx : contexts)
         {
            if (advance(ctx))
            {
               DependencyInfo dependencies = ctx.getDependencyInfo();
               try
               {
                  if (dependencies == null || dependencies.resolveDependencies(this, state))
                     result.add(ctx);
               }
               catch (Throwable error)
               {
                  log.error("Error resolving dependencies for " + state.getStateString() + ": " + ctx.toShortString(), error);
View Full Code Here

      Set<ControllerContext> fromContexts = fromController.getContextsByState(fromState);
      if (fromContexts == null || fromContexts.remove(context) == false)
         throw new Error("INTERNAL ERROR: context not found in previous state " + fromState.getStateString() + " context=" + context.toShortString(), new Exception("STACKTRACE"));

      DependencyInfo dependencies = context.getDependencyInfo();
      if (dependencies != null)
      {
         try
         {
            Set<DependencyItem> dependsOnMe = dependencies.getDependsOnMe(null);
            if (dependsOnMe.isEmpty() == false)
            {
               for (DependencyItem item : dependsOnMe)
               {
                  if (item.isResolved())
View Full Code Here

    * @param isInstallPhase install or uninstall phase
    * @return callback items from dependency info
    */
   protected Set<CallbackItem<?>> getDependencyCallbacks(ControllerContext context, boolean isInstallPhase)
   {
      DependencyInfo di = context.getDependencyInfo();
      if (di != null)
      {
         return isInstallPhase ? di.getInstallItems() : di.getUninstallItems();
      }
      return null;
   }
View Full Code Here

TOP

Related Classes of org.jboss.dependency.spi.DependencyInfo

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.