// 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 java.util.logging.Level;
import javax.jms.Message;
import javax.jms.Queue;
import javax.jms.TemporaryQueue;
import com.ibm.uk.hursley.perfharness.Config;
import com.ibm.uk.hursley.perfharness.Log;
import com.ibm.uk.hursley.perfharness.WorkerThread;
import com.ibm.uk.hursley.perfharness.jms.DestinationWrapper;
		
        // Set correlationID for this thread onto the cached message
        if (Config.parms.getBoolean("co") ) {
        	correlID = msgFactory.setJMSCorrelationID(this, outMessage);
        }            
        
        // Get destination pair if multiple are configured.
        int destID = destFactory.generateDestinationID(getThreadNum());
        String iq = Config.parms.getString("iq");
        String oq = Config.parms.getString("oq");
        if (destID >= 0) {
        	iq += String.valueOf(destID);
        	oq += String.valueOf(destID);
        }
      
        // Open queues
        destProducer = jmsProvider.lookupQueue(iq, session).destination;
        Log.logger.log( Level.FINE, "Creating sender on {0}", getDestinationName(destProducer));
        messageProducer = session.createProducer(destProducer);
        
        String selector = null;
        if (correlID != null) {
			StringBuffer sb = new StringBuffer("JMSCorrelationID='");
			sb.append(correlID);
			sb.append("'");
			selector = sb.toString();
		}

        if (!tempQueues) {
        	//Use permanent queues
// 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/r11/Requestor.java
import java.util.logging.Level;
import javax.jms.Message;
import javax.jms.Queue;
import javax.jms.TemporaryQueue;
import com.ibm.uk.hursley.perfharness.Config;
import com.ibm.uk.hursley.perfharness.Log;
import com.ibm.uk.hursley.perfharness.WorkerThread;
import com.ibm.uk.hursley.perfharness.jms.DestinationWrapper;

		
        // Set correlationID for this thread onto the cached message
        if (Config.parms.getBoolean("co") ) {
        	correlID = msgFactory.setJMSCorrelationID(this, outMessage);
        }            
        
        // Get destination pair if multiple are configured.
        int destID = destFactory.generateDestinationID(getThreadNum());
        String iq = Config.parms.getString("iq");
        String oq = Config.parms.getString("oq");
        if (destID >= 0) {
        	iq += String.valueOf(destID);
        	oq += String.valueOf(destID);
        }
      
        // Open queues
        destProducer = jmsProvider.lookupQueue(iq, session).destination;
        Log.logger.log( Level.FINE, "Creating sender on {0}", getDestinationName(destProducer));
        messageProducer = session.createProducer(destProducer);
        
        String selector = null;
        if (correlID != null) {
			StringBuffer sb = new StringBuffer("JMSCorrelationID='");
			sb.append(correlID);
			sb.append("'");
			selector = sb.toString();
		}

        if (!tempQueues) {
        	//Use permanent queues
        	DestinationWrapper<Queue> consumerDestinationWrapper = jmsProvider.lookupQueue(oq, session);