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 » Which InitialContext to use from Remote Server

Post new topic  Reply to topic
 Which InitialContext to use from Remote Server « View previous topic :: View next topic » 
Author Message
sbuster
PostPosted: Wed Oct 22, 2008 4:41 pm    Post subject: Which InitialContext to use from Remote Server Reply with quote

Apprentice

Joined: 07 Oct 2008
Posts: 25

I would like to connect to an MQ server using JMS + JNDI. What JNDI Context would I use from MQ, and what I would use with a Client? Would I still use the old WMQIntialContextFactory class from MQ 6.


Thanks
Back to top
View user's profile Send private message
atheek
PostPosted: Wed Oct 22, 2008 9:05 pm    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

If you search this forum you will see many reasons why its not advisable to use WMQIntialContextFactory

Better use file based JNDI and com.sun.jndi.fscontext.RefFSContextFactory
Back to top
View user's profile Send private message
sbuster
PostPosted: Thu Oct 23, 2008 2:53 am    Post subject: Reply with quote

Apprentice

Joined: 07 Oct 2008
Posts: 25

So if I have an application on server A trying to connect MQ on server B, how would I access the .bindings file? I sure hope I wouldn't have to copy that file to server A.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 23, 2008 3:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why do you hope that? Why is that a problem? What is "network storage" good for, anyway?

If you are using a JEE application server or a JEE application client, you should be using it's JNDI and not anything else.

If you are using a standalone JMS application, that is not running in a JEE container, then you should use a JNDI provider that makes the most sense for you.

The WMQ JNDI provider (that runs under the WMQInitialContext) is not considered a great choice because it does not provide a logical separation between JNDI names and actual WMQ object names - they are the same name no matter what.
Back to top
View user's profile Send private message
sbuster
PostPosted: Thu Oct 23, 2008 3:38 am    Post subject: Reply with quote

Apprentice

Joined: 07 Oct 2008
Posts: 25

Your assumption is I have the ability for network storage, bad assumption for various unrelated reasons. Also, copying this file around is a very bad idea because it would obviously need to be copied every time it change, bad idea.
My question is, "Is there a network friendly way of accessing MQ via JNDI?".
Back to top
View user's profile Send private message
manicminer
PostPosted: Thu Oct 23, 2008 4:49 am    Post subject: Reply with quote

Disciple

Joined: 11 Jul 2007
Posts: 177

You could use an LDAP server and the LDAP context factory:

com.sun.jndi.ldap.LdapCtxFactory

Just stick your ldap server some place you can access. OpenLDAP should work just fine and is free.

Of course you need to ensure you secure your ldap

The MQ Explorer should be able to allow you to easily create and manage your definitions from LDAP too.
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 » Which InitialContext to use from Remote Server
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.