1 Reply Latest reply: Nov 1, 2013 6:44 PM by Ayush Ganeriwal-Oracle RSS

    MessageSelector and client Id for JMS queues

    ParthD

      Hi everyone,

       

      I am using odi version 11.1.3.3.

       

      I have configured data server , physical and logical schema for JMS queue technology.

      Connection is succesful.

      I also created model for jms queue...created a new datastore

       

      so now when i tried to view data in datastore , there is a windows that appears where i need to enter MESSAGE SELECTOR and CLIENT ID

       

      from where do I get this information about MESSAGE SELECTOR and CLIENT ID???

       

      I need to enter this info so that i can view the message in the queue (which is my data basically)

       

      my java console app for sender in jms queue is as follows:

       

      //this code will populate the queue with message hello

      //all necessary imports

       

      public class Sender

      {

          public static void main(String[] args) throws Exception

          {

           

          Hashtable env = new Hashtable();

          env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");

          env.put(Context.PROVIDER_URL, "t3://localhost:7001");

          env.put(Context.SECURITY_PRINCIPAL, "weblogic");

          env.put(Context.SECURITY_CREDENTIALS, "welcome1");

       

       

          System.out.println("Contents of Env: " +env);

       

          // get the initial context

             InitialContext ctx = new InitialContext(env);

                                                                              

            // lookup the queue object

            Queue queue = (Queue) ctx.lookup("jms/TestJMSQueue");

                                                                             

             // lookup the queue connection factory

             QueueConnectionFactory connFactory = (QueueConnectionFactory) ctx.

                 lookup("jms/TestConnectionFactory");

                                                                              

             // create a queue connection

             QueueConnection queueConn = connFactory.createQueueConnection();

                                                                              

             // create a queue session

             QueueSession queueSession = queueConn.createQueueSession(false,

                 Session.DUPS_OK_ACKNOWLEDGE);

                                                                              

             // create a queue sender

             QueueSender queueSender = queueSession.createSender(queue);

           queueSender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);

                                                                              

             // create a simple message to say "Hello"

             TextMessage message = queueSession.createTextMessage("Hello");

                                                                             

            // send the message

           queueSender.send(message);

                                                                              

             // print what we did

             System.out.println("sent: " + message.getText());

                                                                              

             // close the queue connection

            queueConn.close();

          }

      }