Package com.sun.enterprise.ee.admin.servermgmt

Examples of com.sun.enterprise.ee.admin.servermgmt.EEFileLayout


        //  to read this file to get the port.
        //  If port/host are available in the optionsList, then getPassword() will
        //  get the admin password from .asadminpass file.
    private void getPortAndHost(final AgentConfig ac)
    {
        final EEFileLayout efl = new EEFileLayout(ac);
        try {
            final File xmlFile = efl.getDomainConfigFile();
            if (xmlFile.exists()) {
                final ConfigContext cc  = ConfigFactory.createConfigContext(xmlFile.getAbsolutePath());
                        //get port from HttpListener in domain.xml
                final HttpListener admin = ServerHelper.getHttpListener(cc,
                                                    SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME,
                                                    ServerHelper.ADMIN_HTTP_LISTNER_ID);
                if (admin != null) {
                    final String port = admin.getPort();
                        //set port and host options so that password can be retrieved from .asadminpass
                   
                    setOption("port", port);
                }
            }
        }
        catch (Exception e) {
                //Ignore the exception
                //if there are any issues with reading the port then the port specified in
                // asadminenv.conf will be used.
        }
        try {
                //get the host from das.properties
            final File dasProperties = new File(efl.getConfigRoot(), DAS_PROPERTY_FILE_NAME);
            if (dasProperties.exists()) {
                final Properties prop = new Properties();
                prop.load(new BufferedInputStream(new FileInputStream(dasProperties)));
                final String host = prop.getProperty(AgentConfig.K_DAS_HOST);
                setOption("host", host);
View Full Code Here


    private static final String NODEAGENT_PROPERTY_FILE_NAME = "nodeagent.properties";
   
    public NodeAgentPropertyReader (RepositoryConfig config)
    {      
        AgentConfig nodeAgentConfig = new AgentConfig(config.getRepositoryName(), config.getRepositoryRoot());
        _propertyFileDir = (new EEFileLayout(nodeAgentConfig)).getConfigRoot();      
        _properties = new Properties();
       
        final String host = (String)config.get(AgentConfig.K_ADMIN_HOST);
   
        if (host != null) {             
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.admin.servermgmt.EEFileLayout

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.