Author |
Message
|
kattics |
Posted: Wed Feb 08, 2006 6:33 am Post subject: urgent help needed in MQSeries and LDAP |
|
|
Novice
Joined: 08 Feb 2006 Posts: 19
|
Hi
I was given the address and port of the LDAP server running on a remote machine and also the name of the Queue Manager and Q port number and Queue Name.
How can I place a message in the queue and what are the things that have to be installed on the client to get connectivity.I am new to JMS and complete help is appreciable.
Thanks in advance
-Katti |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 08, 2006 6:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Read the Using Java manual.
Link at top of page  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kattics |
Posted: Wed Feb 08, 2006 6:40 am Post subject: I did but got confused |
|
|
Novice
Joined: 08 Feb 2006 Posts: 19
|
see I give u more details tell me what to do.
Ldap Server: 95.25.200.20
Ldap Port: 8329
Q Manager: SAMP.QMGR
Q port: 11111
Q name: SAMP.QUEUE
these are the details. then how do u connect to the MQserver?
Thanks in advance
-Katti |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 08, 2006 6:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You need to write code that uses that information to establish a connection to the queue manager.
The "Using Java" manual has specific examples of what that code should look like.
What you need to do now is read the "Using Java" manual. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kattics |
Posted: Wed Feb 08, 2006 6:43 am Post subject: |
|
|
Novice
Joined: 08 Feb 2006 Posts: 19
|
Hi
Thanks a lot for your help.
But I was not given any CHANNEL NAME. Do we need to mention the channel name? and is there any way that we can test the listener running or not on the server.
Thanks
-Katti |
|
Back to top |
|
 |
kattics |
Posted: Wed Feb 08, 2006 6:49 am Post subject: |
|
|
Novice
Joined: 08 Feb 2006 Posts: 19
|
my code looks like this.
I am getting error at connection = factory.createQueueConnection();
error: MQJMS2005: failed to create MQQueueManager
-------------------------------------------
private MQQueueConnectionFactory factory = null;
private QueueConnection connection = null;
private QueueSession session = null;
private Queue Q = null;
try
{
factory = new MQQueueConnectionFactory();
factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setQueueManager( "SAMP.QMGR " );
factory.setHostName( "95.25.200.20 " );
factory.setPort( 8329);
System.out.println("[MqConnTest] - SUCCESS: MQ Connection Factory");
connection = factory.createQueueConnection();
System.out.println("[MqConnTest] - SUCCESS: MQ anonymous connection");
session = connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
System.out.println("[MqConnTest] - SUCCESS: JMS session");
Q = session.createQueue("TEST.QUEUE");
System.out.println("[MqConnTest] - SUCCESS: JMS Queue TEST.REQ");
receiver = session.createReceiver(Q);
System.out.println("[MqConnTest] - SUCCESS: obtained receiver");
sender = session.createSender(Q);
System.out.println("[MqConnTest] - SUCCESS: obtained sender");
connection.start();
System.out.println("[MqConnTest] - SUCCESS: started queue connection"); |
|
Back to top |
|
 |
BenR |
Posted: Wed Feb 08, 2006 6:52 am Post subject: |
|
|
Acolyte
Joined: 31 Jan 2006 Posts: 60 Location: Hursley, UK
|
factory.setPort( ...) should point at the port where the MQ listener is running, not the LDAP server.
The fact that there's LDAP information suggests that you're supposed to look up a ConnectionFactory from a JNDI namespace, rather than create it? |
|
Back to top |
|
 |
kattics |
Posted: Wed Feb 08, 2006 6:58 am Post subject: |
|
|
Novice
Joined: 08 Feb 2006 Posts: 19
|
--------------------
The fact that there's LDAP information suggests that you're supposed to look up a ConnectionFactory from a JNDI namespace, rather than create it?
----------------------------
can you elaborate the above statement plzz. and if you can provide sample code how to do it will be great help
thanks a lot for your help.
-Kattics |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 08, 2006 7:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
BenR |
Posted: Wed Feb 08, 2006 7:02 am Post subject: |
|
|
Acolyte
Joined: 31 Jan 2006 Posts: 60 Location: Hursley, UK
|
|
Back to top |
|
 |
kattics |
Posted: Wed Feb 08, 2006 7:03 am Post subject: |
|
|
Novice
Joined: 08 Feb 2006 Posts: 19
|
I gotch u. thanks a lot for ur guidance and will go through that link.
Thanks
-Katti |
|
Back to top |
|
 |
kattics |
Posted: Wed Feb 08, 2006 7:10 am Post subject: |
|
|
Novice
Joined: 08 Feb 2006 Posts: 19
|
factory = (QueueConnectionFactory)ctx.lookup("cn=ivtQCF");
can you tell what is "cn=ivtQCF"? in the above statement.
I am going through chapter 10.
Thanks
-Katti |
|
Back to top |
|
 |
BenR |
Posted: Wed Feb 08, 2006 7:16 am Post subject: |
|
|
Acolyte
Joined: 31 Jan 2006 Posts: 60 Location: Hursley, UK
|
It's the name under which the ConnectionFactory definition was bound in the namespace.
I think that's the name used by the IVTSetup script (have a look at Point to Point verification with JNDI in Chapter 4 of Using Java) |
|
Back to top |
|
 |
kattics |
Posted: Wed Feb 08, 2006 7:27 am Post subject: |
|
|
Novice
Joined: 08 Feb 2006 Posts: 19
|
Hi guys
thanks a lot for ur guidance. I am able to start properly. I will find out what is what very soon with ur help and one more thing. I tried to get description of the ldif file we get for LDAP namespace. i couldn't find much information. do u guys have any idea where i can get description of ldif contents.
Thanks in advance
-katti |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 08, 2006 7:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Rather than try and read the LDIF, I would ask your LDAP administrator what the namespace looks like. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|