Package com.sun.enterprise.ee.admin.hadbmgmt

Examples of com.sun.enterprise.ee.admin.hadbmgmt.HADBInfo


        String agentPort,
        String haAdminPassword,
        String haAdminPasswordFile,
        String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
       
        try
        {
            String pw = (haAdminPassword == null ? "null" : "******");
            String s = "HADBConfigMBean.stopDB() called with " +
                "hosts=" + hosts +
                ", agentPort=" + agentPort +
                ", haAdminPassword=" + pw +
                ", haAdminPasswordFile=" + haAdminPasswordFile +
                ", clusterName=" + clusterName;
           
            getLogger().log(Level.INFO, s);
            info = new HADBInfo(hosts, agentPort, haAdminPassword, haAdminPasswordFile,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBStopDB sdb = new HADBStopDB(info);
            return sdb.stopDB();
        }
        catch(HADBSetupException hse)
        {
            throw hse;
        }
        catch(Exception e)
        {
            throw new HADBSetupException(e);
        }
        finally
        {
            if(info != null)
                info.cleanup();
        }
    }
View Full Code Here


        String agentPort,
        String haAdminPassword,
        String haAdminPasswordFile,
        String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
       
        try
        {
            String pw = (haAdminPassword == null ? "null" : "******");
            String s = "HADBConfigMBean.startDB() called with " +
                "hosts=" + hosts +
                ", agentPort=" + agentPort +
                ", haAdminPassword=" + pw +
                ", haAdminPasswordFile=" + haAdminPasswordFile +
                ", clusterName=" + clusterName;
           
            getLogger().log(Level.INFO, s);
           
            info = new HADBInfo(hosts, agentPort, haAdminPassword, haAdminPasswordFile,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBStartDB sdb = new HADBStartDB(info);
            return sdb.startDB();
        }
        catch(HADBSetupException hse)
        {
            throw hse;
        }
        catch(Exception e)
        {
            throw new HADBSetupException(e);
        }
        finally
        {
            if(info != null)
                info.cleanup();
        }
    }
View Full Code Here

        String agentPort,
        String haAdminPassword,
        String haAdminPasswordFile,
        String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
       
        try
        {
            String pw = (haAdminPassword == null ? "null" : "******");
            String s = "HADBConfigMBean.restartDB() called with " +
                "hosts=" + hosts +
                ", agentPort=" + agentPort +
                ", haAdminPassword=" + pw +
                ", haAdminPasswordFile=" + haAdminPasswordFile +
                ", clusterName=" + clusterName;
           
            getLogger().log(Level.INFO, s);
            info = new HADBInfo(hosts, agentPort, haAdminPassword, haAdminPasswordFile,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBRestartDB rsdb = new HADBRestartDB(info);
            return rsdb.restartDB();
        }
        catch(HADBSetupException hse)
        {
            throw hse;
        }
        catch(Exception e)
        {
            throw new HADBSetupException(e);
        }
        finally
        {
            if(info != null)
                info.cleanup();
        }
    }
View Full Code Here

        String agentPort,
        String haAdminPassword,
        String haAdminPasswordFile,
        String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
       
        try
        {
            String pw = (haAdminPassword == null ? "null" : "******");
            String s = "HADBConfigMBean.pingHadbAgent() called with " +
                "hosts=" + hosts +
                ", agentPort=" + agentPort +
                ", haAdminPassword=" + pw +
                ", haAdminPasswordFile=" + haAdminPasswordFile +
                ", clusterName=" + clusterName;
           
            getLogger().log(Level.INFO, s);
            info = new HADBInfo(hosts, agentPort, haAdminPassword, haAdminPasswordFile,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBPingAgent pinger = new HADBPingAgent(info);
            return pinger.ping();
        }
        catch(HADBSetupException hse)
        {
            throw hse;
        }
        catch(Exception e)
        {
            throw new HADBSetupException(e);
        }
        finally
        {
            if(info != null)
                info.cleanup();
        }
    }
View Full Code Here

     * @return the value of auto-hadb
     * @since 9.0
     */
    public Boolean getAutoHadb(String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
       
        try
        {
            getLogger().log(Level.INFO, "HADBConfigMBean.getAutoHadb() called with cluster = " +
                clusterName);
            info = new HADBInfo(null, null, null, null,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setHostsRequired(false);
            info.setup();
            HADBResourceManager hrm = new HADBResourceManager(info);
            return hrm.getAutoHadbFromConfig() && hrm.isAvailabilityEnabled();
        }
        catch(HADBSetupException hse)
        {
View Full Code Here

     * @throws com.sun.enterprise.ee.admin.hadbmgmt.HADBSetupException In case of any errors
     * @since 9.0
     */
    public void setAutoHadb(Boolean newAutoHadb, String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
       
        try
        {
            getLogger().log(Level.INFO, "HADBConfigMBean.setAutoHadb() called with cluster = " +
                clusterName + ", new autohadb = " + newAutoHadb);
            info = new HADBInfo(null, null, null, null,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBResourceManager hrm = new HADBResourceManager(info);
            hrm.setAutoHadb(newAutoHadb);
        }
        catch(HADBSetupException hse)
        {
View Full Code Here

     * @return the hosts
     * @since 9.0
     */
    public String getHosts(String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
       
        try
        {
            info = new HADBInfo(null, null, null, null,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBResourceManager hrm = new HADBResourceManager(info);
            String hosts = hrm.getHostsFromConfig();
            getLogger().log(Level.INFO, "HADBConfigMBean.getHosts() called with cluster = " +
                clusterName + " Returned: " + hosts);
            return hosts;
View Full Code Here

     * @return The port number as a String
     * @since 9.0
     */
    public String getAgentPort(String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
       
        try
        {
            info = new HADBInfo(null, null, null, null,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBResourceManager hrm = new HADBResourceManager(info);
            String port = hrm.getAgentPortFromConfig();
            getLogger().log(Level.INFO, "HADBConfigMBean.getAgentPort() called with cluster = " +
                clusterName + " Returned: " + port);
            return port;
View Full Code Here

        String    haAdminPasswordFile,
        String    clusterName,
        String    sprops,
        Properties ppropsthrows HADBSetupException
    {
        HADBInfo info = null;
        try
        {
            String pw = (haAdminPassword == null ? "null" : "******");
            String s = "HADBConfigMBean.pingHadbAgent() called with " +
                "hosts=" + hosts +
                ", agentPort=" + agentPort +
                ", haAdminPassword=" + pw +
                ", haAdminPasswordFile=" + haAdminPasswordFile +
                ", clusterName=" + clusterName +
                ", sprops=" + sprops +
                ", pprops=" + pprops;
           
            getLogger().log(Level.INFO, s);
            info = new HADBInfo(hosts, agentPort, haAdminPassword, haAdminPasswordFile,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBRuntimeInfo rtinfo = new HADBRuntimeInfo(info);
           
            if(pprops != null)
                rtinfo.setAttributes(pprops);
            else if(sprops != null)
                rtinfo.setAttributes(sprops);
           
            return rtinfo.getAttributes();
        }
        catch(HADBSetupException hse)
        {
            throw hse;
        }
        catch(Exception e)
        {
            throw new HADBSetupException(e);
        }
        finally
        {
            if(info != null)
                info.cleanup();
        }
    }
View Full Code Here

        String agentPort,
        String haAdminPassword,
        String haAdminPasswordFile,
        String clusterName) throws HADBSetupException
    {
        HADBInfo info = null;
        try
        {
            String pw = (haAdminPassword == null ? "null" : "******");
            String s = "HADBConfigMBean.pingHadbAgent() called with " +
                "hosts=" + hosts +
                ", agentPort=" + agentPort +
                ", haAdminPassword=" + pw +
                ", haAdminPasswordFile=" + haAdminPasswordFile +
                ", clusterName=" + clusterName;
           
            getLogger().log(Level.INFO, s);
            info = new HADBInfo(hosts, agentPort, haAdminPassword, haAdminPasswordFile,
                clusterName, getLogger(), getConfigContext(), getMBeanServer());
            info.setup();
            HADBRuntimeInfo rtinfo = new HADBRuntimeInfo(info);
            readWriteAttributes = rtinfo.getReadWriteAttributes();
            readOnlyAttributes = rtinfo.getReadOnlyAttributes();
            return rtinfo.getAttributes();
        }
        catch(HADBSetupException hse)
        {
            throw hse;
        }
        catch(Exception e)
        {
            throw new HADBSetupException(e);
        }
        finally
        {
            if(info != null)
                info.cleanup();
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.admin.hadbmgmt.HADBInfo

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.