Below is some code I'm writing to test how to write a message producer in JMS. It's not the entirety of the code but it's the relevant piece. For some reason my code hangs after printing "checkpoint2". I checked the JMX Console and the following entry exists...
jboss.mq.destination
name=testQueue,service=Queue
I'm not sure if I'm posting enough relevant info but I'll gladly post more. One thing to note - I upgraded from java 1.4 to java 1.5 recently. Yesterday I got error, "InitialContextException". I googled that and read that this error can happen if you don't uninstall java 1.4 before installing 1.5. I went back and uninstalled both and then reinstalled 1.5. Yet I get this error. I'm running Jboss 4.0.0 on a WinXP Pro machine. I'm running my example through Eclipse. Thanks in advance,
Kevin
import javax.jms.*; import javax.naming.InitialContext; import javax.naming.*; public class Producer { public static void main (String [] args) throws NamingException, JMSException { String queueName = "Queue/testQueue"; System.out.println("chkpt1"); InitialContext ctx = new InitialContext(); System.out.println("chkpt2"); QueueConnectionFactory qcf = (QueueConnectionFactory) ctx.lookup("jms/QueueConnectionFactory"); System.out.println("chkpt3"); ...
Get a stack trace, it should highlight the problem.