//
// JmsaQueueConnectionFactory.java - JMS Adapter QueueConnectionFactory
//
// JmsaCF handles the "administered" object side of things.
//

package nyangau.jmsadapter;

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

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

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

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

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

public Connection createConnection(String userName, String password)
  throws JMSException
  {
  if ( cf == null )
    cf = (QueueConnectionFactory) findFactory();
  return new JmsaConnection( cf.createQueueConnection(userName, password), getFlowProcessor() );
  }
//...e
  // from QueueConnectionFactory
//...screateQueueConnection:2:
public QueueConnection createQueueConnection()
  throws JMSException
  {
  if ( cf == null )
    cf = (QueueConnectionFactory) findFactory();
  return new JmsaQueueConnection( cf.createQueueConnection(), getFlowProcessor() );
  }

public QueueConnection createQueueConnection(String userName, String password)
  throws JMSException
  {
  if ( cf == null )
    cf = (QueueConnectionFactory) findFactory();
  return new JmsaQueueConnection( cf.createQueueConnection(userName, password), getFlowProcessor() );
  }
//...e
  }
