Examples of Naming


Examples of org.apache.geronimo.kernel.Naming

        // Get hold of configuration containing caKeystore GBean
        AbstractName caKeystoreName = PortletManager.getNameFor(request, caKeystore);
        Artifact configurationId =  PortletManager.getConfigurationFor(request, caKeystoreName);
        ServerInfo serverInfo = PortletManager.getCurrentServer(request).getServerInfo();
        AbstractName serverInfoName = PortletManager.getNameFor(request, serverInfo);
        Naming naming = PortletManager.getManagementHelper(request).getNaming();
       
        // Add a CertificateStore GBean
        AbstractName certStoreName = naming.createSiblingName(caKeystoreName, "geronimo-ca-cert-store", NameFactory.CERTIFICATE_STORE);
        GBeanData certStore = new GBeanData(certStoreName, FileCertificateStore.GBEAN_INFO);
        certStore.setAttribute("directoryPath", URI.create(certStorePath));
        certStore.setReferencePattern("ServerInfo", serverInfoName);
        PortletManager.addGBeanToConfiguration(request, configurationId, certStore, true);
       
        // Add a CertificateRequestStore GBean
        AbstractName certReqStoreName = naming.createSiblingName(caKeystoreName, "geronimo-ca-cert-req-store", NameFactory.CERTIFICATE_REQUEST_STORE);
        GBeanData certReqStore = new GBeanData(certReqStoreName, FileCertificateRequestStore.GBEAN_INFO);
        certReqStore.setAttribute("directoryPath", URI.create(certReqStorePath));
        certReqStore.setReferencePattern("ServerInfo", serverInfoName);
        PortletManager.addGBeanToConfiguration(request, configurationId, certReqStore, true);
       
        // Add a CertificationAuthority GBean
        AbstractName caName = naming.createSiblingName(caKeystoreName, "geronimo-ca", NameFactory.CERTIFICATION_AUTHORITY);
        GBeanData ca = new GBeanData(caName, GeronimoCertificationAuthority.GBEAN_INFO);
        ca.setReferencePattern("ServerInfo", serverInfoName);
        ca.setReferencePattern("KeystoreInstance", caKeystoreName);
        ca.setReferencePattern("CertificateStore", certStoreName);
        ca.setReferencePattern("CertificateRequestStore", certReqStoreName);
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

    private void bootDeployerSystem() throws Exception {
        getLog().debug("Booting deployer system...");

        org.apache.geronimo.kernel.repository.Artifact baseId =
                new org.apache.geronimo.kernel.repository.Artifact("geronimo", "packaging", "fixed", "car");
        Naming naming = kernel.getNaming();
        ConfigurationData bootstrap = new ConfigurationData(baseId, naming);
        ClassLoader cl = getClass().getClassLoader();
        Set<AbstractName> repoNames = new HashSet<AbstractName>();

        //
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

        // Get hold of configuration containing caKeystore GBean
        AbstractName caKeystoreName = PortletManager.getNameFor(request, caKeystore);
        Artifact configurationId =  PortletManager.getConfigurationFor(request, caKeystoreName);
        ServerInfo serverInfo = PortletManager.getCurrentServer(request).getServerInfo();
        AbstractName serverInfoName = PortletManager.getNameFor(request, serverInfo);
        Naming naming = PortletManager.getManagementHelper(request).getNaming();
       
        // Add a CertificateStore GBean
        AbstractName certStoreName = naming.createSiblingName(caKeystoreName, "geronimo-ca-cert-store", NameFactory.CERTIFICATE_STORE);
        GBeanData certStore = new GBeanData(certStoreName, FileCertificateStore.GBEAN_INFO);
        certStore.setAttribute("directoryPath", URI.create(certStorePath));
        certStore.setReferencePattern("ServerInfo", serverInfoName);
        PortletManager.addGBeanToConfiguration(request, configurationId, certStore, true);
       
        // Add a CertificateRequestStore GBean
        AbstractName certReqStoreName = naming.createSiblingName(caKeystoreName, "geronimo-ca-cert-req-store", NameFactory.CERTIFICATE_REQUEST_STORE);
        GBeanData certReqStore = new GBeanData(certReqStoreName, FileCertificateRequestStore.GBEAN_INFO);
        certReqStore.setAttribute("directoryPath", URI.create(certReqStorePath));
        certReqStore.setReferencePattern("ServerInfo", serverInfoName);
        PortletManager.addGBeanToConfiguration(request, configurationId, certReqStore, true);
       
        // Add a CertificationAuthority GBean
        AbstractName caName = naming.createSiblingName(caKeystoreName, "geronimo-ca", NameFactory.CERTIFICATION_AUTHORITY);
        GBeanData ca = new GBeanData(caName, GeronimoCertificationAuthority.GBEAN_INFO);
        ca.setReferencePattern("ServerInfo", serverInfoName);
        ca.setReferencePattern("KeystoreInstance", caKeystoreName);
        ca.setReferencePattern("CertificateStore", certStoreName);
        ca.setReferencePattern("CertificateRequestStore", certReqStoreName);
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

    private void bootDeployerSystem() throws Exception {
        log.debug("Booting deployer system...");

        org.apache.geronimo.kernel.repository.Artifact baseId =
                new org.apache.geronimo.kernel.repository.Artifact("geronimo", "packaging", "fixed", "car");
        Naming naming = kernel.getNaming();
        ConfigurationData bootstrap = new ConfigurationData(baseId, naming);
        ClassLoader cl = getClass().getClassLoader();
        Set<AbstractName> repoNames = new HashSet<AbstractName>();

        //
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

     * This contains Repository and ConfigurationStore GBeans that map to
     * the local maven installation.
     */
    private void bootDeployerSystem() throws Exception {
        Artifact baseId = new Artifact("geronimo", "packaging", "fixed", "car");
        Naming naming = kernel.getNaming();
        ConfigurationData bootstrap = new ConfigurationData(baseId, naming);
        ClassLoader cl = PackageBuilder.class.getClassLoader();
        Set repoNames = new HashSet();

        //Source repo
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

    protected void setUp() throws Exception {
        super.setUp();

        refContext = new RefContext(new MockEjbReferenceBuilder(), new MockResourceReferenceBuilder(), new MockServiceReferenceBuilder());

        Naming naming = new Jsr77Naming();
        AbstractName applicationName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "app", NameFactory.J2EE_APPLICATION) ;


        AbstractName coffeeName = naming.createChildName(applicationName, coffee, NameFactory.EJB_MODULE);
        coffee_peaberry = naming.createChildName(coffeeName, "peaberry", NameFactory.STATELESS_SESSION_BEAN);
        coffee_java = naming.createChildName(coffeeName, "java", NameFactory.STATELESS_SESSION_BEAN);

        AbstractName languageName = naming.createChildName(applicationName, language, NameFactory.EJB_MODULE);
        language_lisp = naming.createChildName(languageName, "lisp", NameFactory.STATELESS_SESSION_BEAN);
        language_java = naming.createChildName(languageName, "java", NameFactory.STATELESS_SESSION_BEAN);

        AbstractName carName = naming.createChildName(applicationName, car, NameFactory.EJB_MODULE);
        AbstractName car_gt = naming.createChildName(carName, "gt", NameFactory.STATELESS_SESSION_BEAN);
        car_enzo = naming.createChildName(carName, "enzo", NameFactory.STATELESS_SESSION_BEAN);

//        configuration = null;       
//        configuration.addGBean(new GBeanData(coffee_peaberry, null));
//        configuration.addGBean(new GBeanData(coffee_java, null));
//
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

    public void testJavaBeanXmlAttribute() throws Exception {
        ReferenceCollection referenceCollection = new MockReferenceCollection();
        JavaBeanXmlAttributeBuilder javaBeanXmlAttributeBuilder = new JavaBeanXmlAttributeBuilder();
        //this is kind of cheating, we rely on the builder to iterate through existing members of the collection.
        referenceCollection.add(javaBeanXmlAttributeBuilder);
        Naming naming = new Jsr77Naming();
        new ServiceConfigBuilder(parentEnvironment, null, referenceCollection, null, naming);
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        final URL plan1 = cl.getResource("services/plan1.xml");
        ModuleDocument doc = ModuleDocument.Factory.parse(plan1);
        ModuleType plan = doc.getModule();
        File outFile = File.createTempFile("foo", "bar");
        outFile.delete();
        if (!outFile.mkdirs()) {
            fail("could not create temp dir");
        }
        try {

            Environment environment = EnvironmentBuilder.buildEnvironment(plan.getEnvironment());
            MockRepository mockRepository = new MockRepository();
            ArtifactManager artifactManager = new DefaultArtifactManager();
            ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, Collections.singleton(mockRepository), null);
            ConfigurationManager configurationManager = new SimpleConfigurationManager(Collections.EMPTY_SET, artifactResolver, Collections.EMPTY_SET);
            DeploymentContext context = new DeploymentContext(outFile, null, environment, ConfigurationModuleType.CAR, naming, configurationManager, Collections.singleton(mockRepository));
            AbstractName j2eeContext = naming.createRootName(environment.getConfigId(), environment.getConfigId().toString(), "Configuration");

            GbeanType[] gbeans = plan.getGbeanArray();
            ServiceConfigBuilder.addGBeans(gbeans, cl, j2eeContext, context);
            Set gbeanNames = context.getGBeanNames();
            assertEquals(1, gbeanNames.size());
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

        gbeanDatas = localAttributeManager.applyOverrides(configurationName, gbeanDatas, getClass().getClassLoader());
        assertEquals(referencePatterns, gbeanData.getReferencePatterns(referenceInfo.getName()));
    }

    public void testSetReferences() throws Exception {
        Naming naming = new Jsr77Naming();

        AbstractName referencePattern1 = naming.createRootName(gbeanName.getArtifact(), "name", "referencePattern1");
        AbstractName referencePattern2 = naming.createRootName(gbeanName.getArtifact(), "name", "referencePattern2");
        ReferencePatterns referencePatterns = new ReferencePatterns(new LinkedHashSet(Arrays.asList(new AbstractName[]{referencePattern1, referencePattern2})));
        localAttributeManager.setReferencePatterns(configurationName, gbeanName, referenceInfo, referencePatterns);
        Collection gbeanDatas = new ArrayList();
        GBeanData gbeanData = new GBeanData(gbeanName, GBEAN_INFO);
        gbeanDatas.add(gbeanData);
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

                                            "                </tss:compoundSecMechTypeList>\n" +
                                            "            </tss:tss>";

    public void testCORBABean() throws Exception {
        ClassLoader classLoader = getClass().getClassLoader();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE) ;
        ConfigAdapter configAdapter = new org.apache.geronimo.yoko.ORBConfigAdapter();
        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, classLoader, null, null, null);
        XmlObject xmlObject = getXmlObject(TEST_XML4);
        TSSConfigEditor editor = new TSSConfigEditor();
        Object o = editor.getValue(xmlObject, null, classLoader);
View Full Code Here

Examples of org.apache.geronimo.kernel.Naming

            Security security = buildSecurityConfig(securityType);
            ClassLoader classLoader = applicationContext.getClassLoader();
            SecurityConfiguration securityConfiguration = buildSecurityConfiguration(security, classLoader);
            earContext.setSecurityConfiguration(securityConfiguration);
           
            Naming naming = earContext.getNaming();
            GBeanData roleMapperData = configureRoleMapper(naming, earContext.getModuleName(), securityConfiguration);
            try {
                earContext.addGBean(roleMapperData);
            } catch (GBeanAlreadyExistsException e) {
                throw new DeploymentException("Role mapper gbean already present", e);
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.