// Path: JMSPerfHarness/src/com/ibm/uk/hursley/perfharness/jms/DestinationWrapper.java
// public final class DestinationWrapper<E extends Destination> {
// 	
// 	public E destination;
// 	public String name;
// 	
// 	public DestinationWrapper( String name, E destination ) {
// 		this.destination = destination;
// 		this.name = name;
// 	}
// 	
// }


import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.Session;
import javax.jms.Topic;
import javax.jms.TopicConnectionFactory;
import javax.jms.TopicSession;
import javax.naming.NamingException;
import com.ibm.mq.jms.MQConnectionFactory;
import com.ibm.mq.jms.MQTopic;
import com.ibm.mq.jms.MQTopicConnectionFactory;
import com.ibm.uk.hursley.perfharness.Config;
import com.ibm.uk.hursley.perfharness.jms.DestinationWrapper;
import com.ibm.msg.client.wmq.WMQConstants;
		
		return topic; 
		
	}
	
	public synchronized ConnectionFactory lookupConnectionFactory(String name) throws JMSException, NamingException {
		
		ConnectionFactory cf;
		if ( usingJNDI  ) 
		{
			//call the super method which will get the cf from JNDI and return just that
			return super.lookupConnectionFactory(name);
		} 
		else if (usingMQ)
		{
			//call the super method which will set most of the MQ stuff but we will call our method as well to override/set anything for MB.
			cf = super.lookupConnectionFactory(name);
			configureWBIMBConnectionFactory( (MQConnectionFactory)cf );
		}
		else
		{
			//we must be using IP or MC, lets create and setup the cf ourselves...
			cf = new MQConnectionFactory();
			configureWBIMBConnectionFactory( (MQConnectionFactory)cf );
			return cf;
		} // end if cf==null
		return cf;
	
	}

// Path: JMSPerfHarness/src/com/ibm/uk/hursley/perfharness/jms/DestinationWrapper.java
// public final class DestinationWrapper<E extends Destination> {
// 	
// 	public E destination;
// 	public String name;
// 	
// 	public DestinationWrapper( String name, E destination ) {
// 		this.destination = destination;
// 		this.name = name;
// 	}
// 	
// }


// Path: JMSPerfHarness/src/com/ibm/uk/hursley/perfharness/jms/providers/WMB.java
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.Session;
import javax.jms.Topic;
import javax.jms.TopicConnectionFactory;
import javax.jms.TopicSession;
import javax.naming.NamingException;
import com.ibm.mq.jms.MQConnectionFactory;
import com.ibm.mq.jms.MQTopic;
import com.ibm.mq.jms.MQTopicConnectionFactory;
import com.ibm.uk.hursley.perfharness.Config;
import com.ibm.uk.hursley.perfharness.jms.DestinationWrapper;
import com.ibm.msg.client.wmq.WMQConstants;

		
		return topic; 
		
	}
	
	public synchronized ConnectionFactory lookupConnectionFactory(String name) throws JMSException, NamingException {
		
		ConnectionFactory cf;
		if ( usingJNDI  ) 
		{
			//call the super method which will get the cf from JNDI and return just that
			return super.lookupConnectionFactory(name);
		} 
		else if (usingMQ)
		{
			//call the super method which will set most of the MQ stuff but we will call our method as well to override/set anything for MB.
			cf = super.lookupConnectionFactory(name);
			configureWBIMBConnectionFactory( (MQConnectionFactory)cf );
		}
		else
		{
			//we must be using IP or MC, lets create and setup the cf ourselves...
			cf = new MQConnectionFactory();
			configureWBIMBConnectionFactory( (MQConnectionFactory)cf );
			return cf;
		} // end if cf==null
		return cf;
	
	}

	public DestinationWrapper<Topic> lookupTopic( String topic, Session session ) throws JMSException, NamingException {	