Examples of ConfigurationMetaData


Examples of org.jboss.metadata.ConfigurationMetaData

/*      */   }
/*      */
/*      */   private MessageDrivenContainer createMessageDrivenContainer(BeanMetaData bean, DeploymentUnit unit)
/*      */     throws Exception
/*      */   {
/*  661 */     ConfigurationMetaData conf = bean.getContainerConfiguration();
/*      */
/*  664 */     MessageDrivenContainer container = new MessageDrivenContainer();
/*  665 */     int transType = bean.isContainerManagedTx() ? 2 : 1;
/*      */
/*  667 */     initializeContainer(container, conf, bean, transType, unit);
View Full Code Here

Examples of org.jboss.metadata.ConfigurationMetaData

/*      */   }
/*      */
/*      */   private StatelessSessionContainer createStatelessSessionContainer(SessionMetaData bean, DeploymentUnit unit)
/*      */     throws Exception
/*      */   {
/*  680 */     ConfigurationMetaData conf = bean.getContainerConfiguration();
/*      */
/*  682 */     StatelessSessionContainer container = new StatelessSessionContainer();
/*  683 */     int transType = bean.isContainerManagedTx() ? 2 : 1;
/*  684 */     initializeContainer(container, conf, bean, transType, unit);
/*  685 */     if ((bean.getHome() != null) || (bean.getServiceEndpoint() != null))
View Full Code Here

Examples of org.jboss.metadata.ConfigurationMetaData

/*      */   }
/*      */
/*      */   private StatefulSessionContainer createStatefulSessionContainer(SessionMetaData bean, DeploymentUnit unit)
/*      */     throws Exception
/*      */   {
/*  700 */     ConfigurationMetaData conf = bean.getContainerConfiguration();
/*      */
/*  702 */     StatefulSessionContainer container = new StatefulSessionContainer();
/*  703 */     int transType = bean.isContainerManagedTx() ? 2 : 1;
/*  704 */     initializeContainer(container, conf, bean, transType, unit);
/*  705 */     if ((bean.getHome() != null) || (bean.getServiceEndpoint() != null))
/*      */     {
/*  707 */       createProxyFactories(bean, container);
/*      */     }
/*      */
/*  710 */     ClassLoader cl = unit.getClassLoader();
/*  711 */     container.setInstanceCache(createInstanceCache(conf, cl));
/*      */
/*  713 */     StatefulSessionInstancePool ip = new StatefulSessionInstancePool();
/*  714 */     ip.importXml(conf.getContainerPoolConf());
/*  715 */     container.setInstancePool(ip);
/*      */
/*  717 */     container.setPersistenceManager((StatefulSessionPersistenceManager)cl.loadClass(conf.getPersistenceManager()).newInstance());
/*      */
/*  719 */     container.setLockManager(createBeanLockManager(container, false, conf.getLockClass(), cl));
/*      */
/*  721 */     return container;
/*      */   }
View Full Code Here

Examples of org.objectweb.celtix.configuration.ConfigurationMetadata

        addModel("config-metadata/wsa-config.xml");
        addModel("config-metadata/instrumentation-config.xml");
    }

    public Configuration buildConfiguration(String namespaceUri, String id, Configuration parent) {
        ConfigurationMetadata model = getModel(namespaceUri);
        if (null == model) {
            throw new ConfigurationException(new Message("UNKNOWN_NAMESPACE_EXC", BUNDLE, namespaceUri));
        }
        /*
        if (parent != null && !isValidChildConfiguration(model, parent)) {
View Full Code Here

Examples of org.objectweb.celtix.configuration.ConfigurationMetadata

            builder.getModel(UNKNOWN_CONFIGURATION_URI);
        } catch (ConfigurationException ex) {
            assertEquals("UNKNOWN_NAMESPACE_EXC", ex.getCode());
        }
       
        ConfigurationMetadata unknownModel = EasyMock.createMock(ConfigurationMetadata.class);
        unknownModel.getNamespaceURI();
        EasyMock.expectLastCall().andReturn(UNKNOWN_CONFIGURATION_URI);
        EasyMock.replay(unknownModel);
        builder.addModel(unknownModel);
        assertSame(unknownModel, builder.getModel(UNKNOWN_CONFIGURATION_URI));
        EasyMock.verify(unknownModel);
View Full Code Here

Examples of org.objectweb.celtix.configuration.ConfigurationMetadata

        }
    }
   
    public void testGetConfiguration() {
        ConfigurationBuilder builder = new ConfigurationBuilderImpl();
        ConfigurationMetadata model = EasyMock.createMock(ConfigurationMetadata.class);
        model.getNamespaceURI();
        EasyMock.expectLastCall().andReturn(BUS_CONFIGURATION_URI);
        EasyMock.replay(model);
        builder.addModel(model);
        assertNull(builder.getConfiguration(BUS_CONFIGURATION_URI, "celtix"));       
        EasyMock.verify(model);
       
        model = EasyMock.createMock(ConfigurationMetadata.class);
        model.getNamespaceURI();
        EasyMock.expectLastCall().andReturn(HTTP_LISTENER_CONFIGURATION_URI);
        EasyMock.replay(model);
        builder.addModel(model);
        Configuration parent = EasyMock.createMock(Configuration.class);
        assertNull(builder.getConfiguration(HTTP_LISTENER_CONFIGURATION_URI,
View Full Code Here

Examples of org.objectweb.celtix.configuration.ConfigurationMetadata

        }
        return c;
    }

    public Configuration buildConfiguration(String namespaceUri, String id, Configuration parent) {
        ConfigurationMetadata model = getModel(namespaceUri);
        if (null == model) {
            throw new ConfigurationException(new Message("UNKNOWN_NAMESPACE_EXC", BUNDLE, namespaceUri));
        }
        /*
        if (parent != null && !isValidChildConfiguration(model, parent)) {
View Full Code Here

Examples of org.objectweb.celtix.configuration.ConfigurationMetadata

                throw new ConfigurationException(new Message("METADATA_RESOURCE_EXC",
                                                             BUNDLE, resource));
            }
        }

        ConfigurationMetadata model = null;
        ConfigurationMetadataBuilder builder = new ConfigurationMetadataBuilder(true);
        if (null != is) {
            try {
                model = builder.build(is);
            } catch (IOException ex) {
View Full Code Here

Examples of org.objectweb.celtix.configuration.ConfigurationMetadata

        InputSource src = null;
        src = new InputSource(new File(path).toURI().toString());
       
        ConfigurationMetadataBuilder builder = new ConfigurationMetadataBuilder(false);
        builder.setValidation(true);
        ConfigurationMetadata model = null;

        try {
            model = builder.build(src);
        } catch (IOException ex) {
            throw new ConfigurationException(new Message("FAILED_TO_GENERATE_BEAN_EXC", LOG), ex);
        }
       
        String className = SpringUtils.getBeanClassName(model.getNamespaceURI());
       
        StringBuffer classFileName = new StringBuffer(className);
        for (int i = 0; i < classFileName.length(); i++) {
            if ('.' == classFileName.charAt(i)) {
                classFileName.setCharAt(i, File.separatorChar);
View Full Code Here

Examples of org.objectweb.celtix.configuration.ConfigurationMetadata

        cb = ConfigurationBuilderFactory.getBuilder(null);
       
        ConfigurationMetadataBuilder builder = new ConfigurationMetadataBuilder(true);
        InputStream is = DefaultResourceManager.instance()
            .getResourceAsStream("org/objectweb/celtix/bus/configuration/resources/top.xml");
        ConfigurationMetadata model = null;
        try {
            model = builder.build(is);
        } catch (IOException ex) {
            // ignore
        }
        cb.addModel(model);
        return cb.buildConfiguration(model.getNamespaceURI(), id);
    }
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.