Package org.apache.geronimo.gbean

Examples of org.apache.geronimo.gbean.AbstractName


        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();
            }
            results[i] = new ExistingRealm(realms[i].getRealmName(), abstractName, parent);
        }
        // Once done, release the ConfigurationManager
        if(configMgr != null) {
View Full Code Here


    @SuppressWarnings({"unchecked"})
    private static <T> T getRawService(Kernel kernel, T proxy) {
        if (kernel == null) return proxy;

        AbstractName abstractName = kernel.getAbstractNameFor(proxy);
        if (abstractName == null) return proxy;

        try {
            Object service = kernel.getGBean(abstractName);
            return (T) service;
View Full Code Here

        }
        return gbeans;
    }

    protected GBeanData buildControllerGBean(Artifact configId, NodeInfo nodeInfo, Artifact slaveConfigId) {
        AbstractName controllerName = buildControllerName(configId, nodeInfo);
       
        GBeanData gbean = new GBeanData(controllerName, BasicClusterConfigurationController.GBEAN_INFO);
        gbean.setAttribute(BasicClusterConfigurationController.GBEAN_ATTR_ARTIFACT, slaveConfigId);
        gbean.setAttribute(BasicClusterConfigurationController.GBEAN_ATTR_IGNORE_START_CONF_FAIL_UPON_START,
            Boolean.TRUE);
View Full Code Here

        return gbean;
    }

    protected AbstractName buildControllerName(Artifact configId,
            NodeInfo nodeInfo) {
        return new AbstractName(configId, Collections.singletonMap("nodeName", nodeInfo.getName()));
    }
View Full Code Here

public class MockWebServiceBuilder implements WebServiceBuilder {
    public void findWebServices(Module module, boolean isEJB, Map correctedPortLocations, Environment environment, Map sharedContext) throws DeploymentException {
    }

    public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String seiClassName, DeploymentContext context) throws DeploymentException {
        AbstractName webServiceContainerFactoryName = context.getNaming().createChildName(targetGBean.getAbstractName(), "webServiceContainer", NameFactory.GERONIMO_SERVICE);
        GBeanData webServiceContainerFactoryGBean = new GBeanData(webServiceContainerFactoryName, SerializableWebServiceContainerFactoryGBean.GBEAN_INFO);
        webServiceContainerFactoryGBean.setAttribute("webServiceContainer", new MockWebServiceContainer());
        try {
            context.addGBean(webServiceContainerFactoryGBean);
        } catch (GBeanAlreadyExistsException e) {
View Full Code Here

        this.defaultEnvironment = defaultEnvironment;
        this.wsGBeanInfo = getGBeanInfo(kernel, dataLink);
    }
   
    private static GBeanInfo getGBeanInfo(Kernel kernel, Object webServiceLinkTemplate) throws Exception {
        AbstractName webServiceLinkTemplateName = kernel.getAbstractNameFor(webServiceLinkTemplate);
        return kernel.getGBeanInfo(webServiceLinkTemplateName);
    }
View Full Code Here

                continue;
            }
           
            String ejbName = bean.ejbName;

            AbstractName sessionName = earContext.getNaming().createChildName(module.getModuleName(), ejbName, NameFactory.STATELESS_SESSION_BEAN);

            assert sessionName != null: "StatelesSessionBean object name is null";

            AbstractName ejbWebServiceName = earContext.getNaming().createChildName(sessionName, ejbName, NameFactory.WEB_SERVICE_LINK);
           
            GBeanData ejbWebServiceGBean = new GBeanData(ejbWebServiceName, this.wsGBeanInfo);

            ejbWebServiceGBean.setAttribute("ejbName", ejbName);
            ejbWebServiceGBean.setAttribute("ejbClass", bean.ejbClass);
View Full Code Here

        } else {
            idBuilder.resolve(environment, new File(moduleFile.getName()).getName(), "jar");
        }


        AbstractName moduleName;
        if (earName == null) {
            earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
            moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.EJB_MODULE);
            ejbModule.setModuleId(environment.getConfigId().getArtifactId());
        } else {
View Full Code Here

    }
   
    protected void install(NodeInfo nodeInfo, ConfigurationData configurationData) throws IOException {
        Kernel kernel = nodeInfo.newKernel();

        AbstractName clusterConfigurationStoreName = searchClusterConfigurationStore(kernel);

        File configurationDataFile = uploadConfiguration(kernel, nodeInfo, configurationData);

        boolean inVMCall = nodeInfo.getConnectorInfo().isLocal();
        File oldConfigurationDir = null;
View Full Code Here

    }

    protected void uninstall(NodeInfo nodeInfo, Artifact configId) throws IOException {
        Kernel kernel = nodeInfo.newKernel();
       
        AbstractName clusterConfigurationStoreName = searchClusterConfigurationStore(kernel);
       
        Object[] params = new Object[] {configId};
        try {
            kernel.invoke(clusterConfigurationStoreName, "uninstall", params, METHOD_SIGNATURE_UNINSTALL);
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.gbean.AbstractName

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.