1 Reply Latest reply on Mar 29, 2003 4:16 PM by Adrian Brock

    YASNQ - JMC Consumer external to JBoss

    Simon Wiehe Newbie

      I am trying to write a Message consumer that is external to JBoss, it will connect to my JBoss server and consume messages created by the beans within the container.

      I have followed the examples in the O'Reilly book Enterprise Java Beans but that is for Weblogic. When I try to run the consumer application I get a ClassCastException when I try and connect to the JBoss container with a jndi lookup.

      My code is similar to this:

      Contect jndiContect = new InitialContext();

      TopicConnectionFactory factory = (TopicConnectionFactory)jndiContext.lookup("java:/ConnectionFactory");

      with the second line causing the exception. I am probably missing something from my config file, but I cannot find something that explains what should go in there for JBoss. My base port is 9200 and JBoss is running on the same machine.

      Any help will be much appreciated.

      Thanks

      Simon

      YASNQ - Yet Another Stupid Newbie Question