Package org.apache.geronimo.kernel.config

Examples of org.apache.geronimo.kernel.config.Configuration$ConfigInputStream


        }
        return new JSCommonMessage(CommonMessage.Type.Warn, getLocalizedString(request, BUNDLE_NAME, "portlet.openejb.view.restart"), null);
    }
   
    private GBeanData getGBeanDataFromConfiguration(AbstractName absName){
        Configuration configuration = ConfigurationUtil.getConfigurationManager(kernel).getConfiguration(absName.getArtifact());
        GBeanData gData  = configuration.getGBeans().get(absName);
        return gData;     
    }
View Full Code Here


            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

    /**
     * Cache the ClassLoader for a newly started Configuration. 
     */
    private void configurationRunning(AbstractName name) {
        try {
            Configuration config = (Configuration)kernel.getGBean(name);
            classLoaderMap.put(name, config.getConfigurationClassLoader());
        } catch (GBeanNotFoundException gnfe) {
            log.warn("Could not retrieve GBean for artifact: " + name.toString(), gnfe);
        }
    }
View Full Code Here

                AbstractName jndiContextName = earContext.getNaming().createChildName(appClientDeploymentContext.getModuleName(), "StaticJndiContext", "StaticJndiContext");
                GBeanData jndiContextGBeanData = new GBeanData(jndiContextName, StaticJndiContextPlugin.GBEAN_INFO);
                try {
                    Map<NamingBuilder.Key, Object> buildingContext = new HashMap<NamingBuilder.Key, Object>();
                    buildingContext.put(NamingBuilder.GBEAN_NAME_KEY, jndiContextName);
                    Configuration localConfiguration = appClientDeploymentContext.getConfiguration();
                    Configuration remoteConfiguration = earContext.getConfiguration();

                    if (!appClient.getMetadataComplete()) {
                        // Create a classfinder and populate it for the naming builder(s). The absence of a
                        // classFinder in the module will convey whether metadata-complete is set
                        // (or not)
View Full Code Here

                for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
                    String fileName = iterator.next().toString();
                    ModuleDetails module=new ModuleDetails(fileName);
                    moduleList.add(module);
                   
                    Configuration configration=configrationManager.getConfiguration(Artifact.create(fileName));
                   
                    if(configration!=null){
                        Artifact configId=configration.getId();
                        LinkedHashSet<Artifact> dependencies=configration.getDependencies();
                       
                        for(Artifact dependency:dependencies){
                            addParent(configId,dependency);
                            addChildren(dependency,configId);
                        }
View Full Code Here

                }
        }
    }

    private void validateBrokerName(AbstractName brokerAbName, ActionRequest actionRequest) throws PortletException {
        Configuration brokersConfiguration = PortletManager.getConfigurationManager().getConfiguration(
                brokerAbName.getArtifact());
        Map<AbstractName, GBeanData> abNameGBeanDataMap = (Map<AbstractName, GBeanData>) brokersConfiguration
                .getGBeans();
        String sNewBrokerName = brokerAbName.getNameProperty("name");
        for (AbstractName abName : abNameGBeanDataMap.keySet()) {
            String sGBeanName = abName.getNameProperty("name");
            if (sNewBrokerName.equals(sGBeanName)) {
View Full Code Here

        //For we need list all the brokers including running and stop on the page,
        //While querying in the kernel, we could not get the full list.
        //Currently, all the brokers are in the activemq-broker configuration, we will list all the gbeans in it.
        //But we still could not load those GBeans which are marked with load="false"
        Artifact activeMQBrokersConfig = PortletManager.getNameFor(renderRequest, manager).getArtifact();
        Configuration configuration = PortletManager.getConfigurationManager().getConfiguration(activeMQBrokersConfig);
        AbstractNameQuery query = new AbstractNameQuery(ActiveMQBroker.class.getName());
        LinkedHashSet<GBeanData> brokerNameSet = configuration.findGBeanDatas(Collections.singleton(query));
        Kernel kernel = PortletManager.getKernel();
        try {
            for (GBeanData gBeanData : brokerNameSet) {
                AbstractName abstractName = gBeanData.getAbstractName();
                String brokerName = abstractName.getNameProperty("name");
View Full Code Here

    public NamingBuilder getNamingBuilders() {
        return namingBuilders;
    }

    protected void addGBeanDependencies(EARContext earContext, GBeanData webModuleData) {
        Configuration earConfiguration = earContext.getConfiguration();
        addDependencies(earContext.findGBeanDatas(earConfiguration, MANAGED_CONNECTION_FACTORY_PATTERN), webModuleData);
        addDependencies(earContext.findGBeanDatas(earConfiguration, ADMIN_OBJECT_PATTERN), webModuleData);
        addDependencies(earContext.findGBeanDatas(earConfiguration, STATELESS_SESSION_BEAN_PATTERN), webModuleData);
        addDependencies(earContext.findGBeanDatas(earConfiguration, STATEFUL_SESSION_BEAN_PATTERN), webModuleData);
        addDependencies(earContext.findGBeanDatas(earConfiguration, ENTITY_BEAN_PATTERN), webModuleData);
View Full Code Here

        return destination;
    }


    private ResourceReferenceFactory<RuntimeException> buildAdminObjectReference(Module module, AbstractNameQuery containerId, Class iface) throws DeploymentException {
        Configuration localConfiguration = module.getEarContext().getConfiguration();
        try {
            localConfiguration.findGBean(containerId);
        } catch (GBeanNotFoundException e) {
            throw new DeploymentException("Can not resolve admin object ref " + containerId + " in configuration " + localConfiguration.getId(), e);
        }
        return new ResourceReferenceFactory<RuntimeException>(module.getConfigId(), containerId, iface);
    }
View Full Code Here

        }
    }

    public Configuration getConfiguration(Kernel kernel) {
         ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
         Configuration configuration =  configurationManager.getConfiguration(configId[0]);
         if (configuration == null) {
             throw new IllegalStateException("No configuration found for id: " + configId[0]);
         }
         next: for (int i = 1; i < configId.length; i++) {
             List<Configuration> children = configuration.getChildren();
             for (Configuration child: children) {
                 if (child.getId().equals(configId[i])) {
                     configuration = child;
                     break next;
                 }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.config.Configuration$ConfigInputStream

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.