Author |
Message
|
PankajS |
Posted: Fri Jul 22, 2005 2:27 am Post subject: DO I need to Install LDAP for JMS Applications with MQ |
|
|
Voyager
Joined: 27 Dec 2004 Posts: 82
|
HI friends ,
I am trying to use JMS ,where my undwerlying middle-ware is MQ 5.3..
When run JMSAdmin.bat file(provided in MQ folders)...i get error like ..
JNDI initialization failed, please check your JNDI settings and service
Will i have to install LDAP??
if yse,then what ldap.jar file does that we add in 'classpath'......
Even could be silly question,but i know nothing about JMS or LDAP
Will be greatly helped ,if some one could brief me the steps to implement a sample program using JMS....
Waiting for reply  |
|
Back to top |
|
 |
wschutz |
Posted: Fri Jul 22, 2005 3:15 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
No, you do not need LDAP to use JMS. You can use the file system itself by specifying this in the JMSADmin.config file:
Code: |
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=c:\somethingfilehere |
And this in your java program:
Code: |
String CTX_FACTORY = "com.sun.jndi.fscontext.RefFSContextFactory";
String INIT_URL = "file://c:\somethingfilehere;
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, CTX_FACTORY );
env.put( Context.PROVIDER_URL, INIT_URL );
env.put( Context.REFERRAL, "throw" );
Context ctx = new InitialDirContext( env );
|
See the MQ Java reference manual for more detail.... _________________ -wayne |
|
Back to top |
|
 |
malammik |
Posted: Fri Jul 22, 2005 6:16 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
gayathri |
Posted: Wed Aug 03, 2005 1:57 am Post subject: |
|
|
Apprentice
Joined: 07 Jun 2005 Posts: 36
|
Hi,
It would be great if you brief about this.
Normally in a Java program using JMS we will create a connection factory.
We do a look up in the JNDI namespace and fetch the particular queue object. But this method is not helpful as most of the time our applications does not use Application server. So we normally go in for MQI calls for Java instead of JMS.
It would be great if you can brief about each step to connect to the MQ Server using JMS without LDAP or any App server.
Thanks,
Gayathri |
|
Back to top |
|
 |
JohnRodey |
Posted: Wed Aug 03, 2005 2:44 am Post subject: |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
Using the .bindings local file will resolve your problem with wanting to use JMS without the use of a LDAP. The only issue with this is that every computer wanting to make use of JMS will have to have a .bindings file setup on their machine. So if you have multiple nodes using JMS this most likely isn't your solution.
If you do wish to go this route you will only need to edit your jms config file to:
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=machinename:port/svrconnchannel
Although!!! The MQ Server itself can also be used as the JNDI repository. Look into support pac me01.
http://www-1.ibm.com/support/docview.wss?rs=203&uid=swg24004684&loc=en_US&cs=utf-8&lang=en |
|
Back to top |
|
 |
JohnRodey |
Posted: Wed Aug 03, 2005 2:47 am Post subject: |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
...oops posted wrong provider_url. That's the one used for me01
For .bindings:
PROVIDER_URL=file:/path to your .bindings file.../ |
|
Back to top |
|
 |
vennela |
Posted: Wed Aug 03, 2005 8:41 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
Will be greatly helped ,if some one could brief me the steps to implement a sample program using JMS.... |
Look at the PTPSample01 02 and 03 programs under the sample programs. You can run the programs without any jndi objects. Use the -nojndi option to run the program. That will help you get started.
The comments in the program are really self explanatory. |
|
Back to top |
|
 |
gayathri |
Posted: Thu Aug 04, 2005 1:36 am Post subject: |
|
|
Apprentice
Joined: 07 Jun 2005 Posts: 36
|
Hi,
What is this .bindings file? Would you please explain more of that?
In what way the approach specified by vennela and the approach specified by you are different?
Thanks,
Gayathri |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 04, 2005 2:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Read up on the using Java manual.
Try out the examples...
Enjoy  |
|
Back to top |
|
 |
gayathri |
Posted: Thu Aug 11, 2005 2:55 am Post subject: |
|
|
Apprentice
Joined: 07 Jun 2005 Posts: 36
|
Hi,
Please let me know where I can get the reference manual you have specified in the post.
I badly want to know what .bindings file refer to.
Thanks,
Gayathri |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 11, 2005 3:30 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
gayathri wrote: |
Please let me know where I can get the reference manual you have specified in the post. |
Please try harder.
Almost every single thread in this forum mentions the Using Java manual, and roughly half of those that do include a direct link.
Also, it is an IBM manual, for WebSphere MQ, and thus it is in the same place as all the other IBM WebSphere MQ Manuals. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sanjeevds |
Posted: Tue Feb 06, 2007 1:18 pm Post subject: |
|
|
Newbie
Joined: 07 Sep 2003 Posts: 2
|
Check out IBM document "Connecting the JMS Transport Nodes for WebSphere Message Broker v6 to Popular JMS Providers" dated 06 Oct 2006, section: "Setting up IBM WebSphere MQ v6 as your JMS provider", should get you started.
Next, check out "MS0N: WebSphere MQ - GUI version of the existing JMS Admin tool". This gives you a java based gui tool, which requires JNDI configuration. (Download the tool as well as support pacs included in the document). I used these JNDI parameters (based on configuration steps in first document):
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/JMSNodes/IBM_WMQ/JNDI
SupportPac MS0B used with the GUI tool:
This SupportPac allows you to use a WebSphere MQ queue manager as a JNDI repository. It can dynamically generate JMS administrable objects, based on actual queues on the queue manager - potentially saving you having to define any administrable objects for your JMS application to run or create physical queues when a JMS queue is defined. This can be used with the existing JMS Admin tools available and it supports the storage of other serialisable objects in much the same way as other JNDI implementations.
Just notes from my initial explorations, but I think they have got me started.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 07, 2007 1:35 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You meant support pack ME01 to administer JMS objects... MS0B is the pcf messages support pack.
You might need MS0B to have ME01 work correctly...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 07, 2007 1:36 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Actually, I believe ME01 has been rolled into the product at a recent maintenance level. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|