Examples of ConfigurationManager


Examples of flex.messaging.config.ConfigurationManager

        // Start the broker
        try
        {
            // Get the configuration manager
            ConfigurationManager configManager = loadMessagingConfiguration(servletConfig);

            // Load configuration
            MessagingConfiguration config = configManager.getMessagingConfiguration(servletConfig);

            // Set up logging system ahead of everything else.
            config.createLogAndTargets();

            // Create broker.
            broker = config.createBroker(servletConfig.getInitParameter("messageBrokerId"), loader);

            // Set the servlet config as thread local
            FlexContext.setThreadLocalObjects(null, null, broker, null, null, servletConfig);

            setupInternalPathResolver();

            // Set initial servlet context on broker
            broker.setInitServletContext(servletConfig.getServletContext());

            Logger logger = Log.getLogger(ConfigurationManager.LOG_CATEGORY);
            if (Log.isInfo())
            {
                logger.info(VersionInfo.buildMessage());
            }

            // Create endpoints, services, security, and logger on the broker based on configuration
            config.configureBroker(broker);

            long timeBeforeStartup = 0;
            if (Log.isDebug())
            {
                timeBeforeStartup = System.currentTimeMillis();
                Log.getLogger(LOG_CATEGORY_STARTUP_BROKER).debug("MessageBroker with id '{0}' is starting.",
                        new Object[]{broker.getId()});
            }

            //initialize the httpSessionToFlexSessionMap
            synchronized(HttpFlexSession.mapLock)
            {
                if (servletConfig.getServletContext().getAttribute(HttpFlexSession.SESSION_MAP) == null)
                    servletConfig.getServletContext().setAttribute(HttpFlexSession.SESSION_MAP, new ConcurrentHashMap());
            }

            broker.start();

            if (Log.isDebug())
            {
                long timeAfterStartup = System.currentTimeMillis();
                Long diffMillis = new Long(timeAfterStartup - timeBeforeStartup);
                Log.getLogger(LOG_CATEGORY_STARTUP_BROKER).debug("MessageBroker with id '{0}' is ready (startup time: '{1}' ms)",
                        new Object[]{broker.getId(), diffMillis});
            }

            // Report replaced tokens
            configManager.reportTokens();

            // Report any unused properties.
            config.reportUnusedProperties();

            // clear the broker and servlet config as this thread is done
View Full Code Here

Examples of org.apache.airavata.wsmg.commons.config.ConfigurationManager

    public void startUp(ConfigurationContext configurationcontext, AxisService axisservice) {
      AiravataUtils.setExecutionAsServer();
        Axis2Utils.overrideAddressingPhaseHander(configurationcontext, new StoreMessageHandler());

        // Load the configuration file from the classpath
        ConfigurationManager confmanager = new ConfigurationManager();
        initDatabase(configurationcontext, confmanager);
        configurationcontext.setProperty(ConfigKeys.MSG_PRESV_INTERVAL,getIntervaltoExecuteDelete(confmanager));
        final ConfigurationContext context=configurationcontext;
        new Thread(){
        @Override
View Full Code Here

Examples of org.apache.axis2.cluster.configuration.ConfigurationManager

        if (clusterManager != null) {
            ContextManager contextManager = clusterManager.getContextManager();
            if (contextManager != null) {
                contextManager.setConfigurationContext(this);
            }
            ConfigurationManager configManager = clusterManager.getConfigurationManager();
            if (configManager != null) {
                configManager.setConfigurationContext(this);
            }
            if (shouldClusterBeInitiated(clusterManager)) {
                clusterManager.init();
            }
        }
View Full Code Here

Examples of org.apache.axis2.clustering.configuration.ConfigurationManager

        if (clusterManager != null) {
            ContextManager contextManager = clusterManager.getContextManager();
            if (contextManager != null) {
                contextManager.setConfigurationContext(this);
            }
            ConfigurationManager configManager = clusterManager.getConfigurationManager();
            if (configManager != null) {
                configManager.setConfigurationContext(this);
            }
            if (shouldClusterBeInitiated(clusterManager)) {
                clusterManager.setConfigurationContext(this);
                clusterManager.init();
            }
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationManager

        tmpbasedir.mkdirs();
        environment.setConfigId(configID);
        Jsr77Naming naming = new Jsr77Naming();
        ArtifactManager artifactManager = new DefaultArtifactManager();
        ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, Collections.EMPTY_SET, null);
        ConfigurationManager configurationManager = new SimpleConfigurationManager(Collections.EMPTY_SET, artifactResolver, Collections.EMPTY_SET);
        AbstractName moduleName = naming.createRootName(configID, "testejb", NameFactory.EJB_MODULE);
        context = new DeploymentContext(tmpbasedir, null, environment, moduleName, ConfigurationModuleType.CAR, naming, configurationManager, Collections.EMPTY_SET);

        File moduleLocation = new File(tmpbasedir, "ejb");
        moduleLocation.mkdirs();
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationManager

    public Deployer(String remoteDeployAddress, Collection builders, Collection stores, Collection watchers, Kernel kernel) {
        this(remoteDeployAddress, builders, stores, watchers, getArtifactResolver(kernel), kernel);
    }

    private static ArtifactResolver getArtifactResolver(Kernel kernel) {
        ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
        return configurationManager.getArtifactResolver();
    }
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationManager

    public AbstractName getNameFor(Object component) {
        return kernel.getAbstractNameFor(component);
    }

    public ConfigurationData[] getConfigurations(ConfigurationModuleType type, boolean includeChildModules) {
        ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(kernel);
        List<AbstractName> stores = mgr.listStores();
        List<ConfigurationData> results = new ArrayList<ConfigurationData>();
        for (AbstractName storeName : stores) {
            try {
                List<ConfigurationInfo> infos = mgr.listConfigurations(storeName);
                for (ConfigurationInfo info : infos) {
                    AbstractName configuration = Configuration.getConfigurationAbstractName(info.getConfigID());
                    if (type == null || type.getValue() == info.getType().getValue()) {
                        J2EEDeployedObject module = getModuleForConfiguration(info.getConfigID());
                        results.add(new ConfigurationData(info.getConfigID(), configuration, null, info.getState(), info.getType(), module == null ? null : kernel.getAbstractNameFor(module)));
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationManager

     * Note: this only works if the configuration is running at the time you ask.
     *
     * @return The Module, or null if the configuration is not running.
     */
    public J2EEDeployedObject getModuleForConfiguration(Artifact configuration) {
        ConfigurationManager manager = ConfigurationUtil.getConfigurationManager(kernel);
        Configuration config = manager.getConfiguration(configuration);
        if (config == null || !manager.isRunning(configuration)) {
            return null; // The configuration is not running, so we can't get its contents
        }
        ConfigurationModuleType type = config.getModuleType();
        AbstractName result;
        try {
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationManager

        if(configId == null) {
            throw new ServletException("No configId specified for CAR download");
        }
        Artifact artifact = Artifact.create(configId);
        Kernel kernel = KernelRegistry.getSingleKernel();
        ConfigurationManager mgr = ConfigurationUtil.getConfigurationManager(kernel);
        ConfigurationStore store = mgr.getStoreForConfiguration(artifact);
        try {
            response.setContentType("application/zip");
            String filename = artifact.getArtifactId() + "-" + artifact.getVersion() + "." + artifact.getType();
            response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(filename, "UTF-8"));
            store.exportConfiguration(artifact, response.getOutputStream());
View Full Code Here

Examples of org.apache.geronimo.kernel.config.ConfigurationManager

        // The array entry types are security.realm.SecurityRealm (the subclass)
        org.apache.geronimo.management.geronimo.SecurityRealm[] realms = PortletManager.getCurrentServer(request).getSecurityRealms();
        ExistingRealm[] results = new ExistingRealm[realms.length];

        // ConfigurationManager is used to determine if the SecurityRealm is deployed as a "SERVICE", i.e., "Server-wide"
        ConfigurationManager configMgr = null;
        if(results.length > 0) {
            // Needed only when there are any SecurityRealms
            configMgr = ConfigurationUtil.getConfigurationManager(kernel);
        }
        for (int i = 0; i < results.length; i++) {
            AbstractName abstractName = PortletManager.getNameFor(request, realms[i]);
            String parent;
            Configuration parentConfig = configMgr.getConfiguration(abstractName.getArtifact());
            ConfigurationModuleType parentType = parentConfig.getModuleType();
            if(ConfigurationModuleType.SERVICE.equals(parentType)) {
                parent = null; // Server-wide
            } else {
                parent = abstractName.getArtifact().toString();
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.