ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Cannot see message on queue

Post new topic  Reply to topic
 Cannot see message on queue « View previous topic :: View next topic » 
Author Message
shavo25
PostPosted: Wed Feb 25, 2009 4:46 pm    Post subject: Cannot see message on queue Reply with quote

Apprentice

Joined: 16 Feb 2009
Posts: 29

I have an application client that creates an MQ connection, producer and sends message to the queue. Now no exceptions occur, so when i go to MQ queue manager i expect to see the message on the queue but its not there. NB: This worked for me last week in a different java project so not too sure what i am doing wrong now.

MQ version 6.0
Details for queue connection are:
QueueToInterface=COURTLINK.TO.GENERIC
QueueManagerServer=testmim2.agd.law.test
QueueManagerPort=1415
QueueManagerName=AGDD1
MQServerChannel=S_QM_COURTLINK
ClientID=NSWAGD

Code is :
Code:
/**
    * Create connection to administered objects in webshphere MQ for local court
    * @return
    * @throws JMSException
    */
    protected static MQQueueConnectionFactory makeFactory() throws JMSException {
          MQQueueConnectionFactory factory = new com.ibm.mq.jms.MQQueueConnectionFactory();
           factory.setHostName(config.getWebsphereMQServer());
           factory.setPort(config.getListenerPort());
           factory.setQueueManager(config.getMQueueManagerName());
           factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
           factory.setChannel(config.getServerChannel());
           return factory;
       }

/**
    * Select xml message from the db, and send it to the outgoing queue
    */
    public void processMessages(){
       QueueConnection c = null;
       QueueSender sender = null;
       QueueSession qSession = null;
      
       // MQ Connection and session
        MQQueueConnectionFactory factory;
      try {
         factory = makeFactory();
         c = factory.createQueueConnection();
         c.setClientID(config.getClientID());
         // Note that AUTO_ACKNOWLEDGE is ignored when is transacted is true
         qSession = c.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
         c.start();
         Queue queue1 = qSession.createQueue(config.getQFromInside());
         String xmlMessage = messageJDBC.selectMessageFromXMLMessage();
         TextMessage inboundXMLText = qSession.createTextMessage(xmlMessage);
         sender = qSession.createSender(queue1);
         System.out.println("sending xml message to queue " + queue1.getQueueName());
         sender.send(inboundXMLText);
         
     
Back to top
View user's profile Send private message
shavo25
PostPosted: Wed Feb 25, 2009 5:43 pm    Post subject: Cannot see message on queue Reply with quote

Apprentice

Joined: 16 Feb 2009
Posts: 29

Apologies i did not commit every time i sent a message to the queue. Its working fine now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Cannot see message on queue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.