testDF

Java code posted
created at 19 Oct 14:47

Edit | Back
1
2
3
4
5
6
7
8
9
// Producer will look like 
// cacheSessionSize is fixed for better performance 
// connectionFactory will be vendor specific

private Component produceJmsComponent(String nbConsumers, ConnectionFactory connectionFactory) {
    CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(connectionFactory);
    cachingConnectionFactory.setSessionCacheSize(Integer.parseInt(nbConsumers));
    return JmsComponent.jmsComponent(cachingConnectionFactory);
}
483 Bytes in 3 ms with coderay