Package org.jboss.deployers.spi.management

Examples of org.jboss.deployers.spi.management.ManagementView.load()


   }

   public void testContextMO() throws Exception
   {
      ManagementView mgtView = getManagementView();
      mgtView.load();
      Set<ManagedComponent> comps = mgtView.getComponentsForType(new ComponentType("WAR", "Context"));
      for (ManagedComponent comp : comps)
      {
         if (comp.getDeployment().getName().endsWith("jmx-console.war"))
         {
View Full Code Here


   protected ManagementView getManagementView() throws Exception
   {
      InitialContext ctx = getInitialContext();
      ProfileService ps = (ProfileService)ctx.lookup("ProfileService");
      ManagementView activeView = ps.getViewManager();
      activeView.load();
      return activeView;
   }

   protected ManagedDeployment getDeploymentUnit(String deployment) throws Exception
   {
View Full Code Here

      throws Exception
   {
      InitialContext ctx = getInitialContext();
      ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
      ManagementView activeView = ps.getViewManager();
      activeView.load();
      return activeView;
   }
  
   /**
    * Obtain the ProfileService.ManagementView
View Full Code Here

      }
      //
      mgtView.applyTemplate("LocalTestDS", dsInfo);
     
      // Reload....
      mgtView.load();
     
      // Check
      ManagedDeployment md = mgtView.getDeployment("LocalTestDS-ds.xml");
      assertNotNull(md);
      ManagedComponent mc = mgtView.getComponent(jndiName, KnownComponentTypes.DataSourceTypes.LocalTx.getType());
View Full Code Here

              throw new RuntimeException("Did not find Deployment " + fullFileName);         
            }
        }

        ManagementView mView = profileServiceConnection.getManagementView();
        mView.load();
       
        jbossASComponent.disconnectFromProfileService();
   }
}
View Full Code Here

        this.connectionProvider = connectionProvider;
    }
   
    public void init() {
        ManagementView managementView = getManagementView();
        managementView.load();
        DeploymentManager deploymentManager = getDeploymentManager();
        // Load and associate the given profile with the DeploymentManager for future operations. This is mandatory
        // in order for us to be able to successfully invoke the various DeploymentManager methods.
        try {
            deploymentManager.loadProfile(DEFAULT_PROFILE_KEY);
View Full Code Here

        String deploymentTypeString = deploymentType.getType();

        ManagementView managementView = discoveryContext.getParentResourceComponent().getConnection().getManagementView();
        // TODO (ips): Only refresh the ManagementView *once* per runtime discovery scan, rather than every time this
        //             method is called. Do this by providing a runtime scan id in the ResourceDiscoveryContext.       
        managementView.load();

        Set<String> deploymentNames = null;
        try
        {
            deploymentNames = managementView.getDeploymentNamesForType(deploymentTypeString);
View Full Code Here

            LOG.error("Failed to remove deployment '" + deploymentName + "'.", removeStatus.getFailure());
            throw new Exception("Failed to remove deployment '" + deploymentName + "' - cause: "
                + removeStatus.getFailure());
        }
        ManagementView managementView = connection.getManagementView();
        managementView.load();
    }

    /**
     * Creates the necessary transfer objects to report a failed application deployment (update).
     *
 
View Full Code Here

                LOG.debug("No profile service connection available");
            }
            return null;
        }
        ManagementView managementView = connection.getManagementView();
        managementView.load();
        return managementView;
    }

    static Set<String> getDeploymentNamesForType(ManagementView managementView, ResourceType resourceType) {
        KnownDeploymentTypes deploymentType = ConversionUtils.getDeploymentType(resourceType);
View Full Code Here

        if (LOG.isTraceEnabled()) {
            LOG.trace("Updating " + getResourceDescription() + " with component " + toString(managedComponent) + "...");
        }
        ManagementView managementView = getConnection().getManagementView();
        managementView.updateComponent(managedComponent);
        managementView.load();
    }

    // ------------------------------------------------------------------------------

    /**
 
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.