Examples of AbstractName


Examples of org.apache.geronimo.gbean.AbstractName

                    message.append("configuration=").append(configName);
                    message.append(" gbeanName=").append(name);
                    throw new InvalidConfigException(message.toString());
                }
                GBeanInfo gbeanInfo = GBeanInfo.getGBeanInfo(gbean.getGBeanInfo(), classLoader);
                AbstractName abstractName = (AbstractName) name;
                GBeanData gBeanData = new GBeanData(abstractName, gbeanInfo);
                gbeanDatas.add(gBeanData);
            }
        }
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

     * @return true if the gbean should be loaded, false otherwise.
     * @throws org.apache.geronimo.kernel.config.InvalidConfigException
     *          if we cannot update the gbeanData
     */
    private synchronized boolean setAttributes(GBeanData data, ConfigurationOverride configuration, Artifact configName, ClassLoader classLoader) throws InvalidConfigException {
        AbstractName gbeanName = data.getAbstractName();
        GBeanOverride gbean = configuration.getGBean(gbeanName);
        if (gbean == null) {
            gbean = configuration.getGBean((String) gbeanName.getName().get("name"));
        }

        if (gbean == null) {
            //no attr info, load by default
            return true;
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

        start();

        // startRecursive all of objects that depend on me
        Set dependents = dependencyManager.getChildren(abstractName);
        for (Iterator iterator = dependents.iterator(); iterator.hasNext();) {
            AbstractName dependent = (AbstractName) iterator.next();
            try {
                kernel.startRecursiveGBean(dependent);
            } catch (GBeanNotFoundException e) {
                // this is ok the gbean died before we could start it
            } catch (Exception e) {
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

        // Don't try to stop dependents from within a synchronized block... this should reduce deadlocks

        // stop all of my dependent objects
        Set dependents = dependencyManager.getChildren(abstractName);
        for (Iterator iterator = dependents.iterator(); iterator.hasNext();) {
            AbstractName child = (AbstractName) iterator.next();
            try {
                log.trace("Checking if child is running: child=" + child);
                if (kernel.getGBeanState(child) == State.RUNNING_INDEX) {
                    log.trace("Stopping child: child=" + child);
                    kernel.stopGBean(child);
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

            }

            // check if all of the gbeans we depend on are running
            Set parents = dependencyManager.getParents(abstractName);
            for (Iterator i = parents.iterator(); i.hasNext();) {
                AbstractName parent = (AbstractName) i.next();
                if (!kernel.isLoaded(parent)) {
                    log.trace("Cannot run because parent is not registered: parent=" + parent);
                    return;
                }
                try {
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

            }

            // check if all of the mbeans depending on us are stopped
            Set children = dependencyManager.getChildren(abstractName);
            for (Iterator i = children.iterator(); i.hasNext();) {
                AbstractName child = (AbstractName) i.next();
                if (kernel.isLoaded(child)) {
                    try {
                        log.trace("Checking if child is stopped: child=" + child);
                        int state = kernel.getGBeanState(child);
                        if (state == State.RUNNING_INDEX) {
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

        stores = new ArrayList<ConfigurationStore>();
       
        artifact = new Artifact("groupId", "artifactId", "2.0", "car");

        storeA.getAbstractName();
        nameA = new AbstractName(artifact, Collections.singletonMap("name", "A"));
        modify().multiplicity(expect.from(0)).returnValue(nameA);
       
        storeB.getAbstractName();
        nameB = new AbstractName(artifact, Collections.singletonMap("name", "B"));
        modify().multiplicity(expect.from(0)).returnValue(nameB);

        manager = new EditableKernelConfigurationManager(kernel,
            new AbstractNameQuery(artifact, Collections.singletonMap("name", "B")),
            stores,
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

        this.resourceEnvironmentSetter = resourceEnvironmentSetter;
    }

    public void initContext() throws DeploymentException {
        for (EnterpriseBean enterpriseBean : ejbModule.getEjbJar().getEnterpriseBeans()) {
            AbstractName abstractName = createEjbName(enterpriseBean);
            GBeanData gbean = null;
            if (enterpriseBean instanceof SessionBean) {
                SessionBean sessionBean = (SessionBean) enterpriseBean;
                switch (sessionBean.getSessionType()) {
                    case STATELESS:
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

        File path = new File(BASEDIR, "src/test/resources/deployables/war4");
        UnpackedJarFile jarFile = new UnpackedJarFile(path);
        Module module = builder.createModule(null, jarFile, kernel.getNaming(), new ModuleIDBuilder());
        Repository repository = null;

        AbstractName moduleName = module.getModuleName();
        EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
        module.setEarContext(earContext);
        module.setRootEarContext(earContext);
        builder.initContext(earContext, module, cl);
        builder.addGBeans(earContext, module, cl, Collections.EMPTY_SET);
        ConfigurationData configurationData = earContext.getConfigurationData();
        earContext.close();
        module.close();

        Artifact configurationId = configurationData.getId();
        configurationManager.loadConfiguration(configurationData);
        Configuration configuration = configurationManager.getConfiguration(configurationId);
        configurationManager.startConfiguration(configurationId);

        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(moduleName));
        Set names = configuration.findGBeans(new AbstractNameQuery(moduleName.getArtifact(), Collections.EMPTY_MAP));
        log.debug("names: " + names);
        for (Iterator iterator = names.iterator(); iterator.hasNext();) {
            AbstractName objectName = (AbstractName) iterator.next();
            assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(objectName));
        }

        configurationManager.stopConfiguration(configurationId);
        configurationManager.unloadConfiguration(configurationId);
View Full Code Here

Examples of org.apache.geronimo.gbean.AbstractName

        File path = new File(BASEDIR, "src/test/resources/deployables/war-spaces-in-context");
        UnpackedJarFile jarFile = new UnpackedJarFile(path);
        Module module = builder.createModule(null, jarFile, kernel.getNaming(), new ModuleIDBuilder());
        Repository repository = null;

        AbstractName moduleName = module.getModuleName();
        EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
        module.setEarContext(earContext);
        module.setRootEarContext(earContext);
        builder.initContext(earContext, module, cl);
        builder.addGBeans(earContext, module, cl, Collections.EMPTY_SET);
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.