• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JMSAdmin

 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am a newbie on MQseries.
I am programming a client JMS that run on windows side . And the server MQSeries is on the Linux OS.
From the Linux I used JMSAdmin to create my administrated object ( QManager, Myqueue, myQCF etc...). A file .bindings is generated on the /var/mqm/.bindings.

How to use that file .bindings side client (ie JMS on windows ) in order to communicate the client and the server.

Thanks

here my code


Hashtable env;
InitialContext context;
QueueConnectionFactory qcf;
QueueConnection connection;
Queue queue;

env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
env.put(Context.PROVIDER_URL, PROVIDER_URL);
env.put(Context.SECURITY_AUTHENTICATION,SECU);

try {


context = new InitialContext(env);
qcf = (javax.jms.QueueConnectionFactory)context.lookup(QUEUE_CONNECTION_FACTORY);
connection = qcf.createQueueConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
queue = session.createQueue("MYQUEUE");
MessageProducer sender = session.createProducer(queue);
TextMessage mess = session.createTextMessage("test MQSeries ould nadif");
sender.send(mess);
session.close();
connection.close();


//...
}
catch (javax.naming.NamingException ne) {
ne.printStackTrace();
}
catch (javax.jms.JMSException jms) {
jms.printStackTrace();
}
}
 
Ould Nadif
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is easy.
I can't solve it From Windows directly. The solution is to pass through DOS : piece of cake

ould nadif
 
Evil is afoot. But this tiny ad is just an ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic