/* * Created on Dec 5, 2005 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ package wbitest; import javax.jms.*; //Imports for JNDI import javax.naming.*; import javax.naming.directory.*; //Used for JNDI initialisation import java.util.Hashtable; //The following import would not normally be required in a JMS application, //but is included here to allow us to bypass the JNDI lookup stage import com.ibm.mq.jms.MQQueueConnectionFactory; //Import required for program tracing import com.ibm.mq.jms.services.ConfigEnvironment; /** * * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ public class QueuePut extends QueueTest{ public static void main( String[] args ) { String outString = "A simple text message from PTPSample01"; Queue ioQueue = null; QueueSession session = null; QueueConnection connection = null; QueueConnectionFactory factory = null; Context ctx = null; boolean useJNDI = true; boolean enableTrace = false; String icf = "com.sun.jndi.fscontext.RefFSContextFactory"; String url = null; System.out.println( "\n5648-C60, 5724-B41, 5655-F10 (c) Copyright IBM Corp. 1999. " + "All Rights Reserved."); System.out.println( "Websphere MQ classes for Java(tm) Message Service - "+ "Point to Point Sample 1"+ "\n" ); // Process each of the command-line arguments in turn for( int i=0; i