Ok, here is the solution. First of all I don't really like the example on the WIKI, it leaves out too many details that a newbie like me really needs to configure and test JMS on JBOSS. So I am going to be verbose and offer the full example. Hopefully I can add this solution to the WIKI as well. 1. Configure your project so that you have all the client JARS you will need, and make sure they are all in the classpath (lib). This will allow you to test your JMS producer and consumer remotely. This is the project structure I use to test: Code: .: . .. build-jbossmq.xml jbossmq.war lib .nbattrs src tree.txt web ./lib: . .. concurrent.jar j2ee.jar jboss-common.jar jbossmq.jar jnpserver.jar ./src: . .. com ./src/com: . .. noi ./src/com/noi: . .. jbossmq ./src/com/noi/jbossmq: . .. app ./src/com/noi/jbossmq/app: . .. message util ./src/com/noi/jbossmq/app/message: . .. SimpleConsumer.java SimpleProducer.java ./src/com/noi/jbossmq/app/util: . .. SysLogger.java 2. Create the producer. Code: /* * SimpleProducer.java * * Created on July 22, 2004, 11:30 AM */ package com.noi.jbossmq.app.message; import javax.jms.*; import javax.naming.*; import java.util.Properties; import com.noi.jbossmq.app.util.*; public class SimpleProducer { /** * Main method. * * @param args the destination used by the example, * its type, and, optionally, the number of * messages to send */ public static void main(String[] args) { String messages[] = {"MESSAGE A" , "MESSAGE B" , "MESSAGE C" , "MESSAGE D"}; QueueConnectionFactory queueConnectionFactory = null; Queue testQueue = null; try { SysLogger.info("Creating jndi context - alternatively use a jndi.properties"); Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.PROVIDER_URL, "jnp://192.168.1.7:1099"); InitialContext jndiContext = new InitialContext(properties); queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("ConnectionFactory"); testQueue = (Queue) jndiContext.lookup("queue/testQueue"); } catch (NamingException nameEx) { SysLogger.info("Naming Exception: " + nameEx.toString()); } SysLogger.info("made queue"); QueueConnection queueConnection = null; try { SysLogger.info("trying to send message"); queueConnection = queueConnectionFactory.createQueueConnection(); QueueSession queueSession = queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE); QueueSender queueSender = queueSession.createSender(testQueue); TextMessage textMessage = queueSession.createTextMessage(); SysLogger.info("send each message"); for (int msgCount = 0; msgCount < messages.length; msgCount++) { textMessage.setText(messages[msgCount]); queueSender.send(textMessage); SysLogger.info(" sending line " + msgCount + " : " + messages[msgCount]); } textMessage.setText("end of message"); queueSender.send(textMessage); SysLogger.info(" sending last line " + " : " + textMessage.getText()); queueConnection.close(); SysLogger.info(" sender closed"); } catch (javax.jms.JMSException jmsEx) {System.out.println("JMS Exception: " + jmsEx.toString()); } finally { if (queueConnection != null) { try { queueConnection.close(); } catch (javax.jms.JMSException jmse) { SysLogger.info("jms exception."); } } } } } 3. Create the Consumer Code: /* * SimpleConsumer.java * * Created on July 22, 2004, 12:30 PM */ package com.noi.jbossmq.app.message; import javax.jms.*; import javax.naming.*; import java.util.Properties; import com.noi.jbossmq.app.util.*; /** * * @author clay */ public class SimpleConsumer { public static void main(String[] args) { QueueConnectionFactory queueConnectionFactory = null; Queue testQueue = null; try { SysLogger.info("Creating jndi context - alternatively use a jndi.properties"); Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.PROVIDER_URL, "jnp://192.168.1.7:1099"); InitialContext jndiContext = new InitialContext(properties); queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("ConnectionFactory"); testQueue = (Queue) jndiContext.lookup("queue/testQueue"); } catch (NamingException nameEx) { SysLogger.info("Naming Exception: " + nameEx.toString()); } QueueConnection queueConnection = null; try { queueConnection = queueConnectionFactory.createQueueConnection(); QueueSession queueSession = queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE); QueueReceiver queueReceiver = queueSession.createReceiver(testQueue); queueConnection.start(); TextMessage textMessage = null; while (true) { textMessage = (TextMessage) queueReceiver.receive(1); SysLogger.info(" receiving line " + " : " + textMessage.getText()); if (textMessage.getText().equals("end of message")) {break;} } queueConnection.close(); SysLogger.info(" receiver closed"); } catch (javax.jms.JMSException jmsEx) {SysLogger.info("JMS Exception: " + jmsEx.toString()); } finally { if (queueConnection != null) { try { queueConnection.close(); } catch (javax.jms.JMSException jmse) {} } } } } 4. Make a logger, this one just goes to system.out Code: /* * SysLogger.java * * Created on July 21, 2004, 3:50 PM */ package com.noi.jbossmq.app.util; /** * * @author clay */ public class SysLogger { public static void info(String message) { System.out.println(message); } public static void error(String message, Throwable t) { System.err.println(message); t.printStackTrace(); } } 5. create your ant build, if this is going to become a web application (mine is) you will also need to create a base web directory with a WEB-INF. Code: What I generate is a WAR, that I then extract to a deploy dir. If you dont want to do that then make a JAR instead of a WAR and run it from the command line. This is working for me with the following output: Code: Producer Creating jndi context - alternatively use a jndi.properties made queue trying to send message send each message sending line 0 : MESSAGE A sending line 1 : MESSAGE B sending line 2 : MESSAGE C sending line 3 : MESSAGE D sending last line : end of message sender closed Consumer Creating jndi context - alternatively use a jndi.properties receiving line : MESSAGE A receiving line : MESSAGE B receiving line : MESSAGE C receiving line : MESSAGE D receiving line : end of message receiver closed Good luck, I hope this helps. Clay