Examples of SunTarget


Examples of com.sun.enterprise.deployapi.SunTarget

     * Connects to the local domain adminstration server
     */
    public boolean connect(ServerConnectionIdentifier targetDAS) {
        dasConnection = new MBeanServerConnectionConnectionSource(MBeanServerFactory.getMBeanServer());
        serverId = targetDAS;
        domain = new SunTarget(targetDAS);
        domain.setConnectionSource(dasConnection);
        domain.setTargetType(TargetType.DOMAIN);
        localConnection = Boolean.TRUE;
        return true;
    }
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTarget

        if (targetModuleID==null) {
            throw new ClientExecuteException(localStrings.getLocalString(
                "enterprise.deployapi.actions.clientconfigurationimpl.nomoduleid",
                "No moduleID for deployed application found"));
        }
        SunTarget target = (SunTarget) targetModuleID.getTarget();
        String moduleID;
        if (targetModuleID.getParentTargetModuleID()!=null) {           
            moduleID = targetModuleID.getParentTargetModuleID().getModuleID();
        } else {
            moduleID = targetModuleID.getModuleID();
        }
       
       
        try {
            // retrieve the stubs from the server
            String location = target.exportClientStubs(moduleID, 0,  System.getProperty("java.io.tmpdir"));
      
            // get the module id for the appclient
            String id = targetModuleID.getModuleID();
            if (id.indexOf('#')!=-1) {
                id = id.substring(id.indexOf('#')+1);
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTarget

    public void run() {
        ConnectionSource dasConnection= (ConnectionSource) args[0];
        SunTarget[] targets = (SunTarget[]) args[1];
        moduleID = (String) args[2];
        CommandType newState = (CommandType) args[3];
        SunTarget domain = (SunTarget) args[4];
        StringManager localStrings = StringManager.getManager(getClass());

        ModuleType moduleType;
        try {
            moduleType = DeploymentClientUtils.getModuleType(
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTarget

        ConnectionSource dasConnection= (ConnectionSource) args[0];
        Archive deployArchive = (Archive) args[1];
        Archive deployPlan = (Archive) args[2];
        Map deployOptions = (Map) args[3];
        SunTarget[] targetList = (SunTarget[]) args[4];
        SunTarget domain = (SunTarget) args[5];
        boolean isLocalConnectionSource = ((Boolean) args[6]).booleanValue();
        ServerConnectionIdentifier serverId =
            (ServerConnectionIdentifier) args[7];
        Object archiveUploadID = null;
        Object planUploadID = null;
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTarget

                tlsParams, null);
        } catch (IllegalArgumentException illEx) {
            return false;
        }
        serverId = targetDAS;
        domain = new SunTarget(targetDAS);
        domain.setConnectionSource(dasConnection);
        domain.setTargetType(TargetType.DOMAIN);       
        return true;
    }
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTarget

            } else {
                return null;
            }
            Object[] appRefs = proxySet.toArray();
            for(int k=0; k<appRefs.length; k++) {
                SunTarget aTarget = new SunTarget(serverId);
                aTarget.setAppServerInstance(targets[i]);
                aTarget.setConnectionSource(dasConnection);
                DeployedItemRefConfig item = (DeployedItemRefConfig) appRefs[k];
                SunTargetModuleID tgtId =  new SunTargetModuleID(item.getRef(), aTarget);
                tmpVector.add(tgtId);
            }
        }
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTarget

     */
    private SunTarget[] getSunTargets(Target[] givenTargets) throws IllegalArgumentException {
        SunTarget[] result = new SunTarget[givenTargets.length];
        for(int i=0; i<givenTargets.length; i++) {
            if(givenTargets[i] instanceof SunTarget) {
                result[i] = new SunTarget((SunTarget)givenTargets[i]);
            } else {
                throw new IllegalArgumentException(localStrings.getString("enterprise.deployment.client.notASunTarget",
                                                    givenTargets[i].getClass().getName()));
            }
        }
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTarget

            for(int i=0; i<targets.length; i++) {
               
                // if this is "domain" add a domain target
                if(TargetType.DOMAIN.equals(targets[i])) {
                    // Add a domain target
                    SunTarget dom = new SunTarget(serverId);
                    dom.setAppServerInstance(TargetType.DOMAIN);
                    dom.setConnectionSource(dasConnection);
                    dom.setTargetType(TargetType.DOMAIN);
                    targetsArray[i] = dom;
                    continue;
                }
                // if this is "server" add a server target
                if(DAS.equals(targets[i])) {
                    // Add a target for default server
                    SunTarget serv = new SunTarget(serverId);
                    serv.setAppServerInstance(DAS);
                    serv.setConnectionSource(dasConnection);
                    serv.setTargetType(TargetType.STAND_ALONE_SERVER);
                    targetsArray[i] = serv;
                    continue;
                }
                // for PE, it will not come here at all; go ahead and get proxies and server/cluster keysets from the proxies
                if(serverProxies == null || clusterProxies == null) {
                    DomainConfig domainCfg = ProxyFactory.getInstance(dasConnection).getDomainRoot().getDomainConfig();
                    serverProxies = domainCfg.getStandaloneServerConfigMap();
                    clusterProxies = domainCfg.getClusterConfigMap();
                }
                // check if ctarget is a stand alone server
                if(serverProxies.get(targets[i]) != null) {
                    SunTarget aTarget = new SunTarget(serverId);
                    aTarget.setAppServerInstance(targets[i]);
                    aTarget.setConnectionSource(dasConnection);
                    aTarget.setTargetType(TargetType.STAND_ALONE_SERVER);
                    targetsArray[i] = aTarget;
                    continue;
                }
                // check if ctarget is a cluster
                if(clusterProxies.get(targets[i]) != null) {
                    SunTarget aTarget = new SunTarget(serverId);
                    aTarget.setAppServerInstance(targets[i]);
                    aTarget.setConnectionSource(dasConnection);
                    aTarget.setTargetType(TargetType.CLUSTER);
                    targetsArray[i] = aTarget;
                    continue;
                }
                // if we are here, it means given target does not exist at all - return null
                return null;
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTarget

    public void run() {
        ConnectionSource dasConnection= (ConnectionSource) args[0];
        String moduleID = (String) args[1];
        Map deployOptions = (Map) args[2];
        SunTarget[] targetList = (SunTarget[]) args[3];
        SunTarget domain = (SunTarget) args[4];
        boolean isLocalConnectionSource = ((Boolean) args[5]).booleanValue();

        try {
            // First check if this module is a web module and if so, it is a default web module
            if((DeploymentClientUtils.getModuleType(dasConnection.getExistingMBeanServerConnection(), moduleID)
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.