Package org.apache.webbeans.config

Examples of org.apache.webbeans.config.OpenWebBeansConfiguration


    private boolean supportPassivation;
    private SerializationHandlerV10 handler;

    public DefaultOwbFailOverService()
    {
        OpenWebBeansConfiguration config = webBeansContext.getOpenWebBeansConfiguration();

        String value;

        value = config.getProperty(CONFIG_IS_SUPPORT_FAILOVER);
        if (value != null && value.equalsIgnoreCase("true"))
        {
            supportFailOver = true;
        }

        value = config.getProperty(CONFIG_IS_SUPPORT_PASSIVATE);
        if (value != null && value.equalsIgnoreCase("true"))
        {
            supportPassivation = true;
        }

        if (supportFailOver || supportPassivation)
        {
            value = config.getProperty(CONFIG_RESOURCES_SERIALIZATION_HANDLER);

            if (value != null)
            {
                try
                {
View Full Code Here


public class ConfigurationTest
{
    @Test
    public void testConfigurationParser()
    {
        OpenWebBeansConfiguration cfg = OpenWebBeansConfiguration.getInstance();
       
        // not overloaded
        String ts = cfg.getProperty("org.apache.webbeans.spi.TransactionService");
        Assert.assertNotNull(ts);
        Assert.assertEquals("org.apache.webbeans.spi.ee.TransactionServiceJndiImpl", ts);
       
        // overloaded version 1
        String wbf = cfg.getProperty("org.apache.webbeans.spi.JNDIService");
        Assert.assertNotNull(wbf);
        Assert.assertEquals("org.apache.webbeans.spi.ee.JNDIServiceEnterpriseImpl", wbf);
       
        // property which is only in the specialised openwebbeans.properties
        String testProperty = cfg.getProperty("test.property");
        Assert.assertNotNull(testProperty);
        Assert.assertEquals("true", testProperty);
    }
View Full Code Here

public class ConfigurationTest
{
    @Test
    public void testConfigurationParser()
    {
        OpenWebBeansConfiguration cfg = OpenWebBeansConfiguration.getInstance();
       
        // not overloaded
        String ts = cfg.getProperty("org.apache.webbeans.spi.TransactionService");
        Assert.assertNotNull(ts);
        Assert.assertEquals("org.apache.webbeans.corespi.ee.TransactionServiceJndiImpl", ts);
       
        // overloaded version 1
        String wbf = cfg.getProperty("org.apache.webbeans.spi.JNDIService");
        Assert.assertNotNull(wbf);
        Assert.assertEquals("org.apache.webbeans.corespi.ee.JNDIServiceEnterpriseImpl", wbf);
       
        // property which is only in the specialised openwebbeans.properties
        String testProperty = cfg.getProperty("test.property");
        Assert.assertNotNull(testProperty);
        Assert.assertEquals("true", testProperty);
    }
View Full Code Here

    private boolean supportPassivation;
    private SerializationHandlerV10 handler;

    public DefaultOwbFailOverService()
    {
        OpenWebBeansConfiguration config = webBeansContext.getOpenWebBeansConfiguration();

        String value;

        value = config.getProperty(CONFIG_IS_SUPPORT_FAILOVER);
        if (value != null && value.equalsIgnoreCase("true"))
        {
            supportFailOver = true;
        }

        value = config.getProperty(CONFIG_IS_SUPPORT_PASSIVATE);
        if (value != null && value.equalsIgnoreCase("true"))
        {
            supportPassivation = true;
        }

        if (supportFailOver || supportPassivation)
        {
            OpenWebBeansClassLoaderProvider.initProxyFactoryClassLoaderProvider();
            value = config.getProperty(CONFIG_RESOURCES_SERIALIZATION_HANDLER);

            if (value != null)
            {
                try
                {
View Full Code Here

public class ConfigurationTest
{
    @Test
    public void testConfigurationParser()
    {
        OpenWebBeansConfiguration cfg = WebBeansContext.getInstance().getOpenWebBeansConfiguration();
       
        // not overloaded
        String ts = cfg.getProperty("org.apache.webbeans.spi.TransactionService");
        Assert.assertNotNull(ts);
        Assert.assertEquals("org.apache.webbeans.corespi.ee.TransactionServiceJndiImpl", ts);
       
        // overloaded version 1
        String wbf = cfg.getProperty("org.apache.webbeans.spi.JNDIService");
        Assert.assertNotNull(wbf);
        Assert.assertEquals("org.apache.webbeans.corespi.ee.JNDIServiceEnterpriseImpl", wbf);
       
        // property which is only in the specialised openwebbeans.properties
        String testProperty = cfg.getProperty("test.property");
        Assert.assertNotNull(testProperty);
        Assert.assertEquals("true", testProperty);
    }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.config.OpenWebBeansConfiguration

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.