Author |
Message
|
ewgray |
Posted: Thu Oct 26, 2006 7:05 pm Post subject: WAS 6.0, WMQ6.0 & JNDI |
|
|
Newbie
Joined: 15 Oct 2006 Posts: 4
|
I'm new to Websphere. After spending many hours reading through the documentation and news groups I still can figure out how to get things working.
I have WAS 6 install and have set up and MQ6 as a JMS provider.
I have created Queues and topics through the WAS admin console successfully.
I need to create a remote subscriber to one of the topics and have been trying to use the WAS JNDI to do so, as detailed here:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/rnam_example_prop2.html
But I cannot get it to work. I have been through ever combintion of jars and java runtmes I can think of but to no avail.
As an aside: for my really stupid question: is there a physical representation of a topic that can be viewed through MQExplorer?
Please help.
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 27, 2006 3:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you have set up everything right in WAS you should be able to do the easy thing:
Code: |
Context ctx = new InitialContext();
// alternatively you can try explicitely the ws.... initial context factory with
// iiop://host:2809 or whatever your WAS initial port for iiop is.... |
If you do a standalone setup try a file based jndi (see jmsAdmin)
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ewgray |
Posted: Sat Oct 28, 2006 7:44 pm Post subject: |
|
|
Newbie
Joined: 15 Oct 2006 Posts: 4
|
Thanks for the reply, but I am still having problems.
From furhter invetigation it appears that you can't do when using Sun JRE and is a common problem.
If anyone knows how to access a JMS queue / topic from a remote client runing Sun jre then I will be very grateful.
Thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Oct 29, 2006 5:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you want to do it from a remote client you need all the .jar files from the J2EE client. This in my opinion is a heavy client...
And yes you will need to specify the full setup in your context
like initial context factory and provider url.
Of course the WAS instance where the context is defined must be up and running, and as I said you need the full J2EE client on the path...
As of whether it is possible with Sun or not I cannot tell as I have never tried it. But like I said the J2EE client for websphere is a quite heavy client and my guess is you are missing some of those libraries on your classpath.
This is why for a remote context I usually go with the file context...(com.sun.... see JMSAdmin in using Java manual) which is much easier to instanciate and quite lightweight....(only needs the jars provided with MQ Client)
Enjoy  _________________ MQ & Broker admin
Last edited by fjb_saper on Sun Oct 29, 2006 5:04 am; edited 1 time in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Oct 29, 2006 5:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In general, to access the WAS JNDI you need a full WAS Application Client on the remote machine.
If you only need to access Queues and Topics, you can as FJ says use the File System context to store your JNDI directory, instead of using the WAS JNDI. You should be able to access this from the Sun JRE. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ewgray |
Posted: Sun Oct 29, 2006 12:41 pm Post subject: |
|
|
Newbie
Joined: 15 Oct 2006 Posts: 4
|
Thanks again for info, have everything working now using JMSAdmin method.
Will use the JNDI within WebSphere solely for hosted MDB's. Hopefuly there will be no conflicts.
 |
|
Back to top |
|
 |
ewgray |
Posted: Sun Oct 29, 2006 1:29 pm Post subject: Further Information |
|
|
Newbie
Joined: 15 Oct 2006 Posts: 4
|
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Oct 29, 2006 3:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Glad you liked it.
Although I seldom do pub/sub and Bobby's method might be better for pub/sub, when it comes to point to point messaging I like the file context better:
The reasons:
- more static combination of queues. You have to know what you are doing and define everything in your context beforehand
- No need for additional support packs
- No need for MS0B so people cannot just write some app using the support pack and mess you up...(usually not meaning to...)
- in a client configuration you can ftp the jndi context file to the box where they are needed. Thus you confine the network problems to the connection and don't have to deal with problems in the jndi lookup...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|