Package org.mule.transport.jms

Examples of org.mule.transport.jms.CustomCachingConnectionFactory


    @Test
    public void buildsDefaultCachingConnectionFactory() throws Exception
    {
        factoryBean.setConnectionFactory(connectionFactoryDelegate);
        CustomCachingConnectionFactory connectionFactory = factoryBean.createInstance();
        assertThat(connectionFactory.getSessionCacheSize(), equalTo(CachingConnectionFactoryFactoryBean.DEFAULT_SESSION_CACHE_SIZE));
        assertThat(connectionFactory.isCacheProducers(), equalTo(false));
        assertThat(connectionFactory.isCacheConsumers(), equalTo(false));
        assertThat(connectionFactory.getUsername(), equalTo(null));
        assertThat(connectionFactory.getPassword(), equalTo(null));
    }
View Full Code Here


    {
        int customSize = CachingConnectionFactoryFactoryBean.DEFAULT_SESSION_CACHE_SIZE + 5;
        factoryBean.setConnectionFactory(connectionFactoryDelegate);
        factoryBean.setSessionCacheSize(customSize);

        CustomCachingConnectionFactory connectionFactory = factoryBean.createInstance();

        assertThat(connectionFactory.getSessionCacheSize(), equalTo(customSize));
    }
View Full Code Here

    {
        final boolean customCacheProducers = true;
        factoryBean.setConnectionFactory(connectionFactoryDelegate);
        factoryBean.setCacheProducers(customCacheProducers);

        CustomCachingConnectionFactory connectionFactory = factoryBean.createInstance();

        assertThat(connectionFactory.isCacheProducers(), equalTo(customCacheProducers));
    }
View Full Code Here

        factoryBean.setConnectionFactory(connectionFactoryDelegate);
        factoryBean.setUsername(username);
        factoryBean.setPassword(password);

        CustomCachingConnectionFactory connectionFactory = factoryBean.createInstance();

        assertThat(connectionFactory.getUsername(), equalTo(username));
        assertThat(connectionFactory.getPassword(), equalTo(password));
    }
View Full Code Here

    }

    @Override
    protected CustomCachingConnectionFactory createInstance() throws Exception
    {
        CustomCachingConnectionFactory cachingConnectionFactory = new CustomCachingConnectionFactory(connectionFactory, username, password);
        cachingConnectionFactory.setCacheProducers(cacheProducers);
        cachingConnectionFactory.setSessionCacheSize(sessionCacheSize);
        cachingConnectionFactory.setCacheConsumers(false);

        return cachingConnectionFactory;
    }
View Full Code Here

TOP

Related Classes of org.mule.transport.jms.CustomCachingConnectionFactory

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.