Examples of IApplicationRegistry


Examples of org.apache.qpid.server.registry.IApplicationRegistry

    private final int _jmxPortConnectorServer;

    public JMXManagedObjectRegistry() throws AMQException
    {
        _log.info("Initialising managed object registry using platform MBean server");
        IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();

        // Retrieve the config parameters
        _useCustomSocketFactory = appRegistry.getConfiguration().getUseCustomRMISocketFactory();
        boolean platformServer = appRegistry.getConfiguration().getPlatformMbeanserver();

        _mbeanServer =
                platformServer ? ManagementFactory.getPlatformMBeanServer()
                : MBeanServerFactory.createMBeanServer(ManagedObject.DOMAIN);

        _jmxPortRegistryServer = appRegistry.getConfiguration().getJMXPortRegistryServer();
        _jmxPortConnectorServer = appRegistry.getConfiguration().getJMXConnectorServerPort();

    }
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

        {
            CurrentActor.get().message(ManagementConsoleMessages.READY(true));
            return;
        }

        IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();


        //Socket factories for the RMIConnectorServer, either default or SLL depending on configuration
        RMIClientSocketFactory csf;
        RMIServerSocketFactory ssf;

        //check ssl enabled option in config, default to true if option is not set
        boolean sslEnabled = appRegistry.getConfiguration().getManagementSSLEnabled();

        if (sslEnabled)
        {
            //set the SSL related system properties used by the SSL RMI socket factories to the values
            //given in the configuration file, unless command line settings have already been specified
            String keyStorePath;

            if(System.getProperty("javax.net.ssl.keyStore") != null)
            {
                keyStorePath = System.getProperty("javax.net.ssl.keyStore");
            }
            else
            {
                keyStorePath = appRegistry.getConfiguration().getManagementKeyStorePath();
            }

            //check the keystore path value is valid
            if (keyStorePath == null)
            {
                throw new ConfigurationException("JMX management SSL keystore path not defined, " +
                                             "unable to start SSL protected JMX ConnectorServer");
            }
            else
            {
                //ensure the system property is set
                System.setProperty("javax.net.ssl.keyStore", keyStorePath);

                //check the file is usable
                File ksf = new File(keyStorePath);

                if (!ksf.exists())
                {
                    throw new FileNotFoundException("Cannot find JMX management SSL keystore file: " + ksf);
                }
                if (!ksf.canRead())
                {
                    throw new FileNotFoundException("Cannot read JMX management SSL keystore file: "
                                                    + ksf +  ". Check permissions.");
                }

                CurrentActor.get().message(ManagementConsoleMessages.SSL_KEYSTORE(ksf.getAbsolutePath()));
            }

            //check the key store password is set
            if (System.getProperty("javax.net.ssl.keyStorePassword") == null)
            {

                if (appRegistry.getConfiguration().getManagementKeyStorePassword() == null)
                {
                    throw new ConfigurationException("JMX management SSL keystore password not defined, " +
                                                   "unable to start requested SSL protected JMX server");
                }
                else
                {
                   System.setProperty("javax.net.ssl.keyStorePassword",
                           appRegistry.getConfiguration().getManagementKeyStorePassword());
                }
            }

            //create the SSL RMI socket factories
            csf = new SslRMIClientSocketFactory();
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

            server.addConnector(connector);
        }

        if (sslPort != -1)
        {
            IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();
            String keyStorePath = getKeyStorePath(appRegistry);

            SslContextFactory factory = new SslContextFactory();
            factory.setKeyStorePath(keyStorePath);
            factory.setKeyStorePassword(appRegistry.getConfiguration().getManagementKeyStorePassword());

            SslSocketConnector connector = new SslSocketConnector(factory);
            connector.setPort(sslPort);
            server.addConnector(connector);
        }
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

        String exchangeName = message.getMessageHeader().getReplyToExchange();
        String routingKey = message.getMessageHeader().getReplyToRoutingKey();

        _qmfLogger.debug("Execute: " + this);

        IApplicationRegistry appRegistry = virtualHost.getApplicationRegistry();
        QMFService service = appRegistry.getQMFService();

        QMFPackage qmfPackage = service.getPackage(_package);
        Collection<QMFClass> qmfClasses = qmfPackage.getClasses();

        QMFCommand[] commands = new QMFCommand[ qmfClasses.size() + 1 ];
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

    }

    private void offerRemainingConfigurationToOtherPlugins(String path,
            Configuration configuration, Set<String> elements) throws ConfigurationException
    {
        final IApplicationRegistry appRegistry = safeGetApplicationRegistryInstance();

        if (appRegistry == null)
        {
            // We see this happen during shutdown due to asynchronous reconfig using IO threads.
            // Need to remove the responsibility for offering configuration to other class.
            _logger.info("Cannot offer remaining config to other plugins, can't find app registry");
            return;
        }

        final ConfigurationManager configurationManager = appRegistry.getConfigurationManager();
        // Process the elements in the configuration
        for (String element : elements)
        {
            Configuration handled = element.length() == 0 ? configuration : configuration.subset(element);
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

        _qmfLogger.debug("Execute: " + this);

        String exchangeName = message.getMessageHeader().getReplyToExchange();
        String routingKey = message.getMessageHeader().getReplyToRoutingKey();

        IApplicationRegistry appRegistry = virtualHost.getApplicationRegistry();
        QMFService service = appRegistry.getQMFService();

        QMFPackage qmfPackage = service.getPackage(_packageName);
        QMFClass qmfClass = qmfPackage.getQMFClass( _className );

        QMFCommand[] commands = new QMFCommand[2];
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

    public void process(VirtualHost virtualHost, ServerMessage message)
    {
        String exchangeName = message.getMessageHeader().getReplyToExchange();
        String routingKey = message.getMessageHeader().getReplyToRoutingKey();

        IApplicationRegistry appRegistry = virtualHost.getApplicationRegistry();
        QMFService service = appRegistry.getQMFService();

        _qmfLogger.debug("Execute: " + this);

        List<QMFCommand> commands = new ArrayList<QMFCommand>();
        final long sampleTime = System.currentTimeMillis() * 1000000l;
 
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

    {
        String exchangeName = message.getMessageHeader().getReplyToExchange();
        String routingKey = message.getMessageHeader().getReplyToRoutingKey();


        IApplicationRegistry appRegistry = virtualHost.getApplicationRegistry();
        QMFService service = appRegistry.getQMFService();

        Collection<QMFPackage> supportedSchemas = service.getSupportedSchemas();
       
        QMFCommand[] commands = new QMFCommand[ supportedSchemas.size() + 1 ];
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

        return securityManager.authoriseMethod(Operation.UPDATE, "VirtualHost.Queue", methodName);
    }

    private SecurityManager getSecurityManager(String virtualHost)
    {
        IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();
        SecurityManager security;
        if (virtualHost == null)
        {
            security = appRegistry.getSecurityManager();
        }
        else
        {
            security = appRegistry.getVirtualHostRegistry().getVirtualHost(virtualHost).getSecurityManager();
        }
        return security;
    }
View Full Code Here

Examples of org.apache.qpid.server.registry.IApplicationRegistry

    private boolean _useCustomSocketFactory;

    public JMXManagedObjectRegistry() throws AMQException
    {
        _log.info("Initialising managed object registry using platform MBean server");
        IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();

        // Retrieve the config parameters
        _useCustomSocketFactory = appRegistry.getConfiguration().getUseCustomRMISocketFactory();
        boolean platformServer = appRegistry.getConfiguration().getPlatformMbeanserver();

        _mbeanServer =
                platformServer ? ManagementFactory.getPlatformMBeanServer()
                : MBeanServerFactory.createMBeanServer(ManagedObject.DOMAIN);
    }
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.