Package org.apache.geronimo.gbean

Examples of org.apache.geronimo.gbean.DynamicGAttributeInfo


            getters.keySet().retainAll(setters);
            getters.remove("resourceAdapter");

            for (Iterator iterator = getters.entrySet().iterator(); iterator.hasNext();) {
                Map.Entry entry = (Map.Entry) iterator.next();
                infoBuilder.addAttribute(new DynamicGAttributeInfo((String) entry.getKey(), (String) entry.getValue(), true, true, true, true));
            }

            GBeanInfo gbeanInfo = infoBuilder.getBeanInfo();
            try {
                //make sure the class is available, but we don't use it.
View Full Code Here


    }


    private GBeanData setUpDynamicGBean(GBeanInfoBuilder infoBuilder, ConfigPropertyType[] configProperties, ClassLoader cl) throws DeploymentException {
        for (int i = 0; i < configProperties.length; i++) {
            infoBuilder.addAttribute(new DynamicGAttributeInfo(configProperties[i].getConfigPropertyName().getStringValue().trim(), configProperties[i].getConfigPropertyType().getStringValue().trim(), true, true, true, true));
        }

        GBeanInfo gbeanInfo = infoBuilder.getBeanInfo();
        GBeanData gbeanData = new GBeanData(gbeanInfo);
        for (int i = 0; i < configProperties.length; i++) {
View Full Code Here

            getters.keySet().retainAll(setters);
            getters.remove("resourceAdapter");

            for (Iterator iterator = getters.entrySet().iterator(); iterator.hasNext();) {
                Map.Entry entry =  (Map.Entry) iterator.next();
                infoBuilder.addAttribute(new DynamicGAttributeInfo((String) entry.getKey(), (String) entry.getValue(), true, true, true));
            }

            GBeanInfo gbeanInfo = infoBuilder.getBeanInfo();
            try {
                //make sure the class is available, but we don't use it.
View Full Code Here

        return activationSpecInfos;
    }

    private GBeanMBean setUpDynamicGBean(GBeanInfoBuilder infoFactory, ConfigProperty[] configProperties, ClassLoader cl) throws DeploymentException {
        for (int i = 0; i < configProperties.length; i++) {
            infoFactory.addAttribute(new DynamicGAttributeInfo(configProperties[i].getName(), configProperties[i].getType(),true, true, true));
        }

        GBeanInfo gbeanInfo = infoFactory.getBeanInfo();
        GBeanMBean gbean;
        try {
View Full Code Here

            } catch (InvalidConfigurationException expected) {
            }
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo);
            assertFalse(attribute.isPersistent());
            assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
            assertTrue(attribute.isReadable());
            assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
            assertTrue(attribute.isWritable());
            assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
            assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo);
            assertTrue(attribute.isPersistent());
            assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
            assertTrue(attribute.isReadable());
            assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
            assertTrue(attribute.isWritable());
            assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
            assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true, false,
                    true);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo);
            assertTrue(attribute.isPersistent());
            assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
            assertFalse(attribute.isReadable());
            assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
            assertTrue(attribute.isWritable());
            assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
            assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true, false,
                    false);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo);
            assertTrue(attribute.isPersistent());
            assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
            assertFalse(attribute.isReadable());
            assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
            assertFalse(attribute.isWritable());
            assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
            assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
        }
    }
View Full Code Here

                kernel.shutdown();
            }
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(MockDynamicGBean.MUTABLE_INT_ATTRIBUTE_NAME, true, true, true);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(dynamicGmbean, dynamicAttributeInfo);
            final ObjectName name = new ObjectName("test:name=MyMockDynamicGBean");

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
View Full Code Here

        }
        getters.keySet().retainAll(setters);
        getters.keySet().removeAll(ignore);

        for (Map.Entry<String, String> entry : getters.entrySet()) {
            infoBuilder.addAttribute(new DynamicGAttributeInfo(entry.getKey(), entry.getValue(), true, true, true, true));
        }
    }
View Full Code Here

    }

    void addDynamicAttributes(GBeanInfoFactory infoFactory, ConfigPropertyType[] configProperties) {
        for (int i = 0; i < configProperties.length; i++) {
            ConfigPropertyType configProperty = configProperties[i];
            infoFactory.addAttribute(new DynamicGAttributeInfo(configProperty.getConfigPropertyName().getStringValue(), true));
        }
    }
View Full Code Here

            } catch (InvalidConfigurationException expected) {
            }
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo, null);
            assertFalse(attribute.isPersistent());
            assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
            assertTrue(attribute.isReadable());
            assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
            assertTrue(attribute.isWritable());
            assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
            assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo, null);
            assertTrue(attribute.isPersistent());
            assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
            assertTrue(attribute.isReadable());
            assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
            assertTrue(attribute.isWritable());
            assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
            assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true, false,
                    true);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo, null);
            assertTrue(attribute.isPersistent());
            assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
            assertFalse(attribute.isReadable());
            assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
            assertTrue(attribute.isWritable());
            assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
            assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true, false,
                    false);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo, null);
            assertTrue(attribute.isPersistent());
            assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
            assertFalse(attribute.isReadable());
            assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
            assertFalse(attribute.isWritable());
            assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
            assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
        }
    }
View Full Code Here

                kernel.shutdown();
            }
        }

        {
            final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(
                    MockDynamicGBean.MUTABLE_INT_ATTRIBUTE_NAME, true, true, true);
            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(dynamicGmbean, dynamicAttributeInfo, null);
            final ObjectName name = new ObjectName("test:name=MyMockDynamicGBean");

            final Kernel kernel = new Kernel("test.kernel", "test");
View Full Code Here

TOP

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

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.