Examples of DASPropertyReader


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

            throws ConfigException, IOException  {

        String url = null;

        if (ctx != null) {
            DASPropertyReader dpr = new DASPropertyReader(
                    new InstanceConfig(InstanceDirs.getInstanceRoot()));
            dpr.read();
            url = getSynchronizationURL(ctx, dpr);
        }

        return url;
    }
View Full Code Here

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

    public static SynchronizationDriver getSynchronizationDriver(
            String root, String xml, String url) throws IOException {

        SynchronizationDriver driver = null;

        DASPropertyReader dpr = new DASPropertyReader(new InstanceConfig());
        dpr.read();

        if (url != null) {
            String transport= System.getProperty(SYNCHRONIZATION_TRANSPORT_KEY);
            if (JMX_TRANSPORT.equalsIgnoreCase(transport)) {
                driver = new JmxSynchronizationDriver(root, xml, dpr);
View Full Code Here

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

            }                       
           
            // connecting to DAS. Using DAS property reader
            if ( SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME.compareTo(
                    instanceName) == 0 ) {
               DASPropertyReader dpr = new DASPropertyReader(
                            new InstanceConfig());

                try {
                    dpr.read();
                } catch (IOException ioe) {
                    String msg = _localStrMgr.getString("DASPropReadNotFound");
                    throw new SynchronizationException(msg);
                }
                url = dpr.getJMXURL();               
            }
            else {
                try {
                    ConfigContext cfgCtx = ApplicationServer.getServerContext().
                                                getConfigContext();
View Full Code Here

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

            }                       
           
            // connecting to DAS. Using DAS property reader
            if ( SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME.compareTo(
                    instanceName) == 0 ) {
               DASPropertyReader dpr = new DASPropertyReader(
                            new InstanceConfig());

                try {
                    dpr.read();
                } catch (IOException ioe) {
                    String msg = _localStrMgr.getString("DASPropReadNotFound");
                    throw new SynchronizationException(msg);
                }
                url = dpr.getJMXURL();               
            }
            else {
                try {
                    ConfigContext cfgCtx = ApplicationServer.getServerContext().
                                                getConfigContext();
View Full Code Here

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

    // ---- END OF ApplicationsMgr Interface ---------------------------

    private void getBits(ApplicationSynchRequest appSyncReq)
            throws SynchronizationException {

        DASPropertyReader dpr = new DASPropertyReader(
                            new InstanceConfig(InstanceDirs.getInstanceRoot()));

        List l = appSyncReq.toSynchronizationRequest();
        SynchronizationRequest[] allReqs = new SynchronizationRequest[
                                                l.size()];
        allReqs = (SynchronizationRequest[])l.toArray(allReqs);

        try {
            // reads DAS system JMX connector information
            dpr.read();
        } catch (IOException ioe) {
            String msg=_localStrMgr.getString("DASPropertyReadError");
            throw new SynchronizationException(msg, ioe);
        }
View Full Code Here

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

        // FIXME: this needs to tell the user the proper place which is dictated by its config ???
        System.out.println(_strMgr.getString("nodeAgent.redirecting.output", System.getProperty("com.sun.aas.instanceRoot") + "/logs/server.log"));
        getLogger().log(Level.INFO, "nodeagent.starting.agent");

        // Read in the DAS configuration (it may not be present).
        DASPropertyReader dasReader = new DASPropertyReader(new AgentConfig());
        try {            
            dasReader.read();
            if (dasReader.getPort() != null) {
                getLogger().log(Level.CONFIG, "DAS url = " + dasReader.getJMXURL());            
            }
        } catch (Exception e) {
            getLogger().log(Level.INFO, "nodeAgent.das_properties_not_found",e);
        }
View Full Code Here

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

    private AgentConfig _agentConfig;     
  
    public static Properties env;
       
    public NodeAgent() throws Exception {       
        this(new DASPropertyReader(new AgentConfig()),
             new NodeAgentPropertyReader(new AgentConfig()), new AgentConfig());
    }
View Full Code Here

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

        this(new DASPropertyReader(new AgentConfig()),
             new NodeAgentPropertyReader(new AgentConfig()), new AgentConfig());
    }

    public NodeAgent(AgentConfig agentConfig) throws Exception {
        this(new DASPropertyReader(agentConfig),
             new NodeAgentPropertyReader(agentConfig), agentConfig);
        // now reset InstanceDirs properly.
        // Note this is a create-node-agent call.  We are running in DAS, not NA
        InstanceDirs.initialize(agentConfig);
    }         
View Full Code Here

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

    }
   
    private void writeToDASPropertyReader(String newHost, String newPort)
    throws IOException {
        // get appropriate das properties
        DASPropertyReader dasProperty = getDASPropertyReader();
        // something changed for the das connection, update das properties
        dasProperty.setPort(newPort);
        dasProperty.setHost(newHost);
        // logmessage so the user will know to change say /etc/hosts file
        // so it becomes pingable.
        dasProperty.write();

        getLogger().log(Level.CONFIG, "nodeagent.changeOfDASValues",
                        new Object[] {newHost + ":" + newPort, newHost} );   
    }
View Full Code Here

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

                SynchronizationDriverFactory.NODE_AGENT_STARTUP_CONFIG_URL);
    }
   
    private Vector synchronizeWithDASInternal(String url) throws AgentException {
        getLogger().log(Level.INFO, "nodeagent.ExecutingSync");
        final DASPropertyReader dasEnv = getDASPropertyReader();
       
        // We want to control initialization ourselves. The issue is that we do
        // not want initialization (i.e.loading of NSS) to happen implicitly
        // here or we will not able to synchronize the NSS database on Windows
        // platforms since it will be in use. For this reason, we do not want
        // orb initialization in our InitialContextFactory to occur.
        SerialInitContextFactory.setInitializeOrbManager(false);
       
        // Setup as an SSL client
        if (Boolean.valueOf(dasEnv.isDASSecure()).booleanValue()) {
            String certNickname = "s1as";
            /*try {
                if (getConfigContext() != null)
                    certNickname = ServerHelper.getCertNickname(
                        getConfigContext(), DAS_SERVER_NAME);
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.