<commit_before>/**
 * Copyright (C) 2009 - 2009 by OpenGamma Inc.
 *
 * Please see distribution for license.
 */
package com.opengamma.livedata.client;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;

import javax.jms.ConnectionFactory;

import org.fudgemsg.FudgeContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.Lifecycle;
import org.springframework.jms.listener.DefaultMessageListenerContainer;

import com.opengamma.transport.ByteArrayFudgeMessageReceiver;
import com.opengamma.transport.FudgeRequestSender;
import com.opengamma.transport.jms.JmsByteArrayMessageDispatcher;
import com.opengamma.util.ArgumentChecker;

/**
 * 
 *
 * @author kirk
 */
public class JmsLiveDataClient extends DistributedLiveDataClient implements Lifecycle {
  private static final Logger s_logger = LoggerFactory.getLogger(JmsLiveDataClient.class);
  private final ConnectionFactory _connectionFactory;
  private final Map<String, DefaultMessageListenerContainer> _listenerContainersBySpec =
    new HashMap<String, DefaultMessageListenerContainer>();
  private AtomicBoolean _running = new AtomicBoolean(false);

  public JmsLiveDataClient(FudgeRequestSender subscriptionRequestSender, ConnectionFactory connectionFactory) {
    this(subscriptionRequestSender, connectionFactory, new FudgeContext());
  }

  public JmsLiveDataClient(FudgeRequestSender subscriptionRequestSender, ConnectionFactory connectionFactory, FudgeContext fudgeContext) {
    super(subscriptionRequestSender, fudgeContext);
    ArgumentChecker.notNull(connectionFactory, "JMS Connection Factory");
    _connectionFactory = connectionFactory;<commit_msg>Don't create a new FudgeContext; use the global default instead.<commit_after>/**
 * Copyright (C) 2009 - 2009 by OpenGamma Inc.
 *
 * Please see distribution for license.
 */
package com.opengamma.livedata.client;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;

import javax.jms.ConnectionFactory;

import org.fudgemsg.FudgeContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.Lifecycle;
import org.springframework.jms.listener.DefaultMessageListenerContainer;

import com.opengamma.transport.ByteArrayFudgeMessageReceiver;
import com.opengamma.transport.FudgeRequestSender;
import com.opengamma.transport.jms.JmsByteArrayMessageDispatcher;
import com.opengamma.util.ArgumentChecker;

/**
 * 
 *
 * @author kirk
 */
public class JmsLiveDataClient extends DistributedLiveDataClient implements Lifecycle {
  private static final Logger s_logger = LoggerFactory.getLogger(JmsLiveDataClient.class);
  private final ConnectionFactory _connectionFactory;
  private final Map<String, DefaultMessageListenerContainer> _listenerContainersBySpec =
    new HashMap<String, DefaultMessageListenerContainer>();
  private AtomicBoolean _running = new AtomicBoolean(false);

  public JmsLiveDataClient(FudgeRequestSender subscriptionRequestSender, ConnectionFactory connectionFactory) {
    this(subscriptionRequestSender, connectionFactory, FudgeContext.GLOBAL_DEFAULT);
  }

  public JmsLiveDataClient(FudgeRequestSender subscriptionRequestSender, ConnectionFactory connectionFactory, FudgeContext fudgeContext) {
    super(subscriptionRequestSender, fudgeContext);
    ArgumentChecker.notNull(connectionFactory, "JMS Connection Factory");
    _connectionFactory = connectionFactory;
{'fraction_non_alphanumeric': 0.0752441125789776, 'fraction_numerical': 0.005743825387708214, 'mean_word_length': 6.97025171624714, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5214018', 'n_tokens_mistral': 936, 'n_tokens_neox': 910, 'n_words': 201}