1 Reply Latest reply on Dec 26, 2002 5:23 PM by Vinay Salehithal

    New bie question: JMS configuration in JBoss 3.0

    Ivy Lim Newbie

      Hi,

      Does anyone know the steps for JBoss 3.0 to configure a new Connection factory, a new JMS server and its destination. I'm a newbie. I have the steps to do the specifics in WebLogic, but not for JBoss.

      I've read the QuickStartGuide on JMS, but it's not sufficient for me. Please help.


      Here are the WebLogic specifics: -
      1. Click Services-JMS-ConnectionFactories-Configure a new Connection factory

      2. Supply the following arguments.

      For Name: proofofconceptEventTopic
      For JNDI Name: weblogic.poc.event.TopicConnectionFactory

      3. Create a JMS server under Services-JMS-Servers-Configure a New JMS Server

      4. Create destination for the FrameworkEventJMS using Services-JMS-Servers-Destinations-Configure a new JMS Topic

      For Name: proofofconceptEventTopic
      For JNDI Name: weblogic.poc.event.proofofconceptEventTopic



      IN SUMMARY, how do I configure JBoss JMS for codes like: -

      //Lookup ConnectionFactory via JNDI
      TopicConnectionFactory qcf=(TopicConnectionFactory)ctx.lookup("weblogic.poc.event.TopicConnectionFactory");


      //Lookup Desintation (topic) via JNDI
      Topic topic = (Topic) ctx.lookup("weblogic.poc.event.proofofconceptEventTopic");


      OR

      TopicSession.createTopic("weblogic.poc.event.proofofconceptEventTopic")


      Thank you.

      - Ivy

        • 1. Re: New bie question: JMS configuration in JBoss 3.0
          Vinay Salehithal Newbie

          For a quick start, follow the steps below:
          1. In <jboss-home>\server\default\deploy\directory... jbossmq-destinations-service.xml, jms-service.xml, jbossmq-service.xml are the three files that deal with jms stuff.
          2. <jboss-home>\server\default\deploy\jbossmq-destinations-service.xml contains default destinations provided by JBoss. Say we choose the default topic "testTopic". When JBoss starts this is registered with the JNDI name of Topic/testTopic.
          3. In the same file, u can also see the connectionfactory provided .. for eg java:/XAConnectionFactory.
          4. So yr code cd be

          //** code **//
          Topic topic = (Topic)ctx.lookup("topic/testTopic");
          TopicConnectionFactory tconFactory = (TopicConnectionFactory)ctx.lookup("java:/XAConnectionFactory");
          TopicConnection tcon = tconFactory.createTopicConnection();
          TopicSession tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
          TopicPublisher tpublisher = tsession.createPublisher(topic);
          TextMessage msg = tsession.createTextMessage();
          tcon.start();
          msg.setText("Hello");
          tpublisher.publish(msg);
          tpublisher.close();
          tsession.close();
          tcon.close();

          This shd help for a quick start. You can go thru the various messages posted in JBoss/JMS forum to understand, how's, what's, where's of JBOSS JMS. That's what i am trying to do. :-)

          cheers...