//
// JmsaTopicConnectionFactory.java - JMS Adapter TopicConnectionFactory
//
// JmsaCF handles the "administered" object side of things.
//

package nyangau.jmsadapter;

import java.util.Map;
import javax.jms.*;

public class JmsaTopicConnectionFactory extends JmsaCF implements TopicConnectionFactory
  {
  protected transient TopicConnectionFactory cf;
//...sJmsaTopicConnectionFactory:2:
public JmsaTopicConnectionFactory(TopicConnectionFactory connfact, Map<String,Object> map)
  {
  super(map);
  cf = connfact;
  }

public JmsaTopicConnectionFactory(Map<String,Object> map)
  {
  super(map);
  cf = null;
  }

public JmsaTopicConnectionFactory(Map<String,Object> map, Map<String,Object> map2)
  {
  super(map, map2);
  cf = null;
  }

public JmsaTopicConnectionFactory()
  {
  cf = null;
  }
//...e
  // from ConnectionFactory
//...screateConnection:2:
public Connection createConnection()
  throws JMSException
  {
  if ( cf == null )
    cf = (TopicConnectionFactory) findFactory();
  return new JmsaConnection( cf.createTopicConnection(), getFlowProcessor() );
  }

public Connection createConnection(String userName, String password)
  throws JMSException
  {
  if ( cf == null )
    cf = (TopicConnectionFactory) findFactory();
  return new JmsaConnection( cf.createTopicConnection(userName, password), getFlowProcessor() );
  }
//...e
  // from TopicConnectionFactory
//...screateTopicConnection:2:
public TopicConnection createTopicConnection()
  throws JMSException
  {
  if ( cf == null )
    cf = (TopicConnectionFactory) findFactory();
  return new JmsaTopicConnection( cf.createTopicConnection(), getFlowProcessor() );
  }

public TopicConnection createTopicConnection(String userName, String password)
  throws JMSException
  {
  if ( cf == null )
    cf = (TopicConnectionFactory) findFactory();
  return new JmsaTopicConnection( cf.createTopicConnection(userName, password), getFlowProcessor() );
  }
//...e
  }
