FileDocCategorySizeDatePackage
InstanceSyncWithDAS_TlsClientEnvSetter.javaAPI DocGlassfish v2 API3993Fri May 04 22:33:54 BST 2007com.sun.enterprise.admin.server.core.jmx.ssl

InstanceSyncWithDAS_TlsClientEnvSetter

public class InstanceSyncWithDAS_TlsClientEnvSetter extends AsTlsClientEnvSetter
This class is meant specifically for the setup of client side environment when the Node agent synchronizes an instance with a DAS
author
Nandini.Ektare@sun.com
since
Sun Java System Application Server 8.2ee

Fields Summary
private String
mCertNickname
Constructors Summary
public InstanceSyncWithDAS_TlsClientEnvSetter()

        super();
        mCertNickname = System.getProperty(
            SystemPropertyConstants.AGENT_CERT_NICKNAME);
    
Methods Summary
protected javax.net.ssl.TrustManager[]getTrustManagers()

        InMemoryX509TrustManager mgr = null;
        try {
            
            String instanceRoot = System.getProperty(
                SystemPropertyConstants.INSTANCE_ROOT_PROPERTY);
            String serverName = System.getProperty(
                SystemPropertyConstants.SERVER_NAME);
            
            System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, 
                System.getProperty(SystemPropertyConstants.AGENT_ROOT_PROPERTY));
            System.setProperty(SystemPropertyConstants.SERVER_NAME, 
                System.getProperty(SystemPropertyConstants.AGENT_NAME_PROPERTY));
            mgr = new InMemoryX509TrustManager(mCertNickname);

            System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, instanceRoot);
            System.setProperty(SystemPropertyConstants.SERVER_NAME, serverName);
        } catch (Throwable t) {
            t.printStackTrace();
        }
        
        return new TrustManager[] {mgr};