Cant lookup a TopicConnectionFactory using RefFSContextFactory
I can successfully use JMSAdmin to load my objects into a local file. I have a TopicConnectionFactory called myTCF, and a Topic called Java.
Here is my JMSAdmin.config entries:
Here is my setup file for JMSAdmin:
def tcf(MyTCF) qmgr(QM1)
def t(Java) topic(computers/Java)
This creates a .bindings file int the c:\tmp\mq directory. Here is a piece of the file:
#This file is used by the JNDI FSContext.
#Fri Oct 24 10:30:44 EDT 2003
My code to reference these objects can read the initial context (mq), but I cant seem to lookup these objects. I use the same InitalContextFactory and ProviderURL, but my ctx.lookup() keeps failing with javax.naming.NameNotFoundException.
I tried mq/myTCF, mq.myTCF, myTCF, jms/mq/myTCF, ect.
Am I using the right syntax for this TopicConnectionFactory?
Any help would be greatly appreciated.
I found my own problem.
The provider URL needed to have "/mq" added:
ProviderURL = file:/C:/tmp/mq
This is odd, since my JMSAdmin provider URL, only had the /tmp.....
The lookup() variables should be:
Hopefully this will be a good example for someone else....