Package com.sun.enterprise.ee.admin.clientreg

Examples of com.sun.enterprise.ee.admin.clientreg.MBeanServerConnectionInfo


     * Pings central repository admin.
     */
    public void execute() {

        try {
            MBeanServerConnectionInfo connInfo =
                new MBeanServerConnectionInfo(_dasInfo);

            int count = 0;

            // (re) attempts to contact DAS
            while (count < MAX_RETRY) {
View Full Code Here


    /**
     * Returns a concrete implementation of Get command.
     */
    protected Command getGetCommand() {
        // connects to the DAS MBean server
        MBeanServerConnectionInfo connInfo = new MBeanServerConnectionInfo(
                                                            _dasProperties);
        return new JmxGetCommand(_request, connInfo);
    }
View Full Code Here

            if (!isAuditON()) {
                return;
            }

            // get repository content list from DAS
            MBeanServerConnectionInfo connInfo =
                new MBeanServerConnectionInfo(dasProperties);
            AuditGetCommand aCommand = new AuditGetCommand(_requests, connInfo);
            aCommand.execute();
            SynchronizationResponse response =
                (SynchronizationResponse) aCommand.getResult();
View Full Code Here

    /**
     * Updates the das properties from domain.xml if they have changed
     */
    protected void updateDASConnectionInfo() throws Exception {

        MBeanServerConnectionInfo dasInfo =
            InstanceRegistry.getDASConnectionInfo(getConfigContext());
        boolean bWrite = false;

        // get appropriate das properties
        DASPropertyReader dasProperty = getDASPropertyReader();
        if (!dasProperty.getProtocol().equals(dasInfo.getProtocol()) ||
            !dasProperty.getPort().equals(dasInfo.getPort()) ||
            !dasProperty.getHost().equals(dasInfo.getHost())) {

            // something changed for the das connection, update das properties
            dasProperty.setProtocol(dasInfo.getProtocol());
            dasProperty.setPort(dasInfo.getPort());
            dasProperty.setHost(dasInfo.getHost());
            bWrite = true;
           
            // log message so the user will know to change hosts file
            // so it is pingable.
            getLogger().log(Level.CONFIG, "nodeagent.changeOfDASValues",
                new Object[] {dasInfo.getHost() + ":" + dasInfo.getPort(),
                              dasInfo.getHost()});
           
        }
       
        // check to see if jmx secure flas has changed
        Server das = ServerHelper.getDAS(getConfigContext());
View Full Code Here

   
    private synchronized NodeAgentsConfigMBean getProxy()       
    {
        if (_proxy == null) {
            try {
                MBeanServerConnectionInfo connInfo = new MBeanServerConnectionInfo(
                    "localhost", "8686", "jmxmp", "admin", "admin123");
                ObjectName objname  = new ObjectName(IAdminConstants.DAS_NODECONTROLLER_MBEAN_NAME);           
                _proxy = (NodeAgentsConfigMBean)MBeanServerProxy.getMBeanServerProxy(
                    NodeAgentsConfigMBean.class, objname, connInfo);
                //force a connection to the mbean server
View Full Code Here

        } else {
            final ConfigContext configContext = getConfigContext();
            if (ServerHelper.isDAS(configContext, s)) {
                return true;
            } else {
                final MBeanServerConnectionInfo dasInfo = InstanceRegistry.
                    getDASConnectionInfo(configContext);
                final MBeanServerConnectionInfo serverInfo = InstanceRegistry.
                    getInstanceConnectionInfo(configContext, s.getName());
                /*
                    We determine if the server is on the same host as the DAS by seeing
                    if the server's mbean server connection info matches that of the
                    DAS. Also, if the server's host is the localhost (i.e. the same
                    host that the DAS is running on).
                 */
                return (dasInfo.getHost().equals(serverInfo.getHost()) ||
                        isLocalHost(serverInfo.getHost()));
            }
        }
    }
View Full Code Here

        AgentException
    {      
        final ConfigContext configContext = getConfigContext();
        ArrayList result = new ArrayList();
        if (NodeAgentHelper.hasNodeAgentRendezvousd(configContext, agent)) {           
            MBeanServerConnectionInfo agentInfo = NodeAgentRegistry.getNodeAgentConnectionInfo(
                configContext, agent.getName());
            String hostName = agentInfo.getHost();
            NodeAgent[] agents = NodeAgentHelper.getNodeAgentsInDomain(configContext);
            for (int i = 0; i < agents.length; i++) {
                if (NodeAgentHelper.hasNodeAgentRendezvousd(configContext, agents[i])) {
                    if (!agents[i].getName().equals(agent.getName())) {
                        agentInfo = NodeAgentRegistry.getNodeAgentConnectionInfo(
                            configContext, agents[i].getName());
                        if (hostName.equals(agentInfo.getHost())) {
                            result.add(agents[i]);
                        }
                    }
                }
            }
View Full Code Here

        boolean isServerRunning)
        throws ConfigException, PortInUseException, InstanceException, AgentException
    {
        final ConfigContext configContext = getConfigContext();                           
        final String serverName = server.getName();       
        final MBeanServerConnectionInfo serverInfo = InstanceRegistry.getInstanceConnectionInfo(
            configContext, serverName);
        final String hostName = serverInfo.getHost();
        final boolean isBoundToHost = isBoundToHost(server);
       
        PortInUseException exception = null;               
       
        //check for invalid ports (i.e. non-numeric ports or ports that are outside the valid range).
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.admin.clientreg.MBeanServerConnectionInfo

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.