Examples of ProfileServiceConnection


Examples of org.rhq.plugins.jbossas5.connection.ProfileServiceConnection

    private String getNewResourceKey(ResourceUpgradeContext<ProfileServiceComponent<?>> upgradeContext,
        String existingResourceKey) {

        String newResourceKey;
        ProfileServiceConnection connection = upgradeContext.getParentResourceComponent().getConnection();
        if (connection == null) {
            LOG.warn(getClass().getName() + ": could not upgrade resource, no profile service connection available");
            return null;
        }
        ManagementView managementView = connection.getManagementView();
        ManagedDeployment deployment;
        try {
            deployment = managementView.getDeployment(existingResourceKey);
        } catch (NoSuchDeploymentException e) {
            throw new IllegalStateException(e);
View Full Code Here

Examples of org.rhq.plugins.jbossas5.connection.ProfileServiceConnection

            .getStringValue();

        componentName = context.getPluginConfiguration().getSimple(PlatformDiscoveryComponent.PLATFORM_COMPONENT_NAME)
            .getStringValue();

        ProfileServiceConnection connection = context.getParentResourceComponent().getConnection();

        ManagementView managementView = connection.getManagementView();

        ManagedDeployment deploy = managementView.getDeployment(deployName);
        if (deploy != null) {
            Map<String, ManagedComponent> components = deploy.getComponents();
View Full Code Here

Examples of org.rhq.plugins.jbossas5.connection.ProfileServiceConnection

        return propToUseAsComponentName.getStringValue();
    }


    private Deployer getDeployer(ResourceType resourceType) {
        ProfileServiceConnection profileServiceConnection = this.component.getConnection();

        PackageDownloader downloader = runningEmbedded() ? new LocalDownloader() : new RemoteDownloader(
            component.getResourceContext(), false, profileServiceConnection);

        if (ScriptComponent.TYPE_NAME.equals(resourceType.getName())) {
View Full Code Here

Examples of org.rhq.plugins.jbossas5.connection.ProfileServiceConnection

     * @return if successful, the Resource details, otherwise, null
     */
    @Nullable
    public DiscoveredResourceDetails discoverInProcessJBossAS(ResourceDiscoveryContext discoveryContext) {
        ProfileServiceConnectionProvider connectionProvider = new LocalProfileServiceConnectionProvider();
        ProfileServiceConnection connection;
        try {
            connection = connectionProvider.connect();
        } catch (Exception e) {
            // This most likely just means we're not embedded inside a JBoss 5.x or 6.x app server instance.
            log.debug("Unable to connect to in-process ProfileService.", e);
            return null;
        }

        ManagementView managementView = connection.getManagementView();
        ManagedComponent serverConfigComponent = ManagedComponentUtils.getSingletonManagedComponent(managementView,
            new ComponentType("MCBean", "ServerConfig"));
        String serverName = (String) ManagedComponentUtils.getSimplePropertyValue(serverConfigComponent, "serverName");

        // serverHomeDir is the full path to the instance's configuration dir, e.g. "/opt/jboss-5.1.0.GA/server/default";
View Full Code Here

Examples of org.rhq.plugins.jbossas5.connection.ProfileServiceConnection

    }

    private Set<ManagedComponent> addManagedDeploymentComponent(String deployName, String componentName,
        ResourceDiscoveryContext<ApplicationServerComponent<?>> context) throws NoSuchDeploymentException {

        ProfileServiceConnection connection = context.getParentResourceComponent().getConnection();

        ManagementView managementView = connection.getManagementView();

        Set<ManagedComponent> components = new HashSet<ManagedComponent>();
        ManagedDeployment deploy = managementView.getDeployment(deployName);
        if (deploy != null) {
            if (componentName == null || componentName.equals("*"))
 
View Full Code Here

Examples of org.rhq.plugins.jbossas5.connection.ProfileServiceConnection

    // ------------ OperationFacet Implementation ------------

    @Override
    public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
        ProfileServiceConnection connection = getConnection();
        if (connection == null) {
            OperationResult result = new OperationResult();
            result.setErrorMessage("No profile service connection available");
            return result;
        }

        String deploymentName = getDeploymentName();

        if (deploymentName == null) {
            OperationResult result = new OperationResult();
            result.setErrorMessage("Did not find deployment with key [" + deploymentKey + "]");
            return result;
        }

        DeploymentManager deploymentManager = connection.getDeploymentManager();
        DeploymentProgress progress;
        if (name.equals("start")) {
            //FIXME: This is a workaround until JOPR-309 will be fixed.
            if (getAvailability() != AvailabilityType.UP) {
                progress = deploymentManager.start(deploymentName);
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.