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 » urgent help needed in MQSeries and LDAP

Post new topic  Reply to topic
 urgent help needed in MQSeries and LDAP « View previous topic :: View next topic » 
Author Message
kattics
PostPosted: Wed Feb 08, 2006 6:33 am    Post subject: urgent help needed in MQSeries and LDAP Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 08, 2006 6:37 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kattics
PostPosted: Wed Feb 08, 2006 6:40 am    Post subject: I did but got confused Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 08, 2006 6:41 am    Post subject: Reply with quote

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
View user's profile Send private message
kattics
PostPosted: Wed Feb 08, 2006 6:43 am    Post subject: Reply with quote

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
View user's profile Send private message
kattics
PostPosted: Wed Feb 08, 2006 6:49 am    Post subject: Reply with quote

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
View user's profile Send private message
BenR
PostPosted: Wed Feb 08, 2006 6:52 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kattics
PostPosted: Wed Feb 08, 2006 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 08, 2006 7:00 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

We're really not kidding when we say you should read the Using Java manual.

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/csqzaw1364.htm

And we're not trying to brush you off. We're trying to give you the best resource, so you can quickly answer your own questions.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
BenR
PostPosted: Wed Feb 08, 2006 7:02 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2006
Posts: 60
Location: Hursley, UK

Try Chapter 10.
Back to top
View user's profile Send private message Visit poster's website
kattics
PostPosted: Wed Feb 08, 2006 7:03 am    Post subject: Reply with quote

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
View user's profile Send private message
kattics
PostPosted: Wed Feb 08, 2006 7:10 am    Post subject: Reply with quote

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
View user's profile Send private message
BenR
PostPosted: Wed Feb 08, 2006 7:16 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kattics
PostPosted: Wed Feb 08, 2006 7:27 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 08, 2006 7:32 am    Post subject: Reply with quote

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
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 » urgent help needed in MQSeries and LDAP
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.