>I've gone through a number of the java tutorial step by step and they simply
>do not run. Any other examples would be appreciated.
>ic.lookup("java:comp/env/jms/MyConnectionFactory");
In Sun's tutorial they show code like this:
Context ctx = new InitialContext();
QueueConnectionFactory queueConnectionFactory =
(QueueConnectionFactory) ctx.lookup("QueueConnectionFactory");
TopicConnectionFactory topicConnectionFactory =
(TopicConnectionFactory) ctx.lookup("TopicConnectionFactory");
Where did you read about the java: syntax?
Next, you realize you must download and install some sort of JMS
server, e.g. the one bundled with J2EE.
See http://mindprod.com/jgloss/jms.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Mike Gaab - 23 Nov 2005 18:21 GMT
>>I've gone through a number of the java tutorial step by step and they
>>simply
[quoted text clipped - 13 lines]
>
> Where did you read about the java: syntax?
In the java tutorial for j2ee 1.4
> Next, you realize you must download and install some sort of JMS
> server, e.g. the one bundled with J2EE.
dah...
In order to write a standalone client, I need to locate where and which
messaging
service is being used. What I can not find is the following two parameters.
INITIAL_CONTEXT_FACTORY=
PROVIDER_URL=
These are needed to setup the intial context. The can be set
programmatically
or via a resource. Your example of creating an InitialContext with an empty
constructor will call the jndi.properties files. I can't find that either.
Mike
Mike Gaab - 23 Nov 2005 18:25 GMT
>>>I've gone through a number of the java tutorial step by step and they
>>>simply
[quoted text clipped - 23 lines]
> In order to write a standalone client, I need to locate where and which
> messaging service is being used.
a dah for me too. ;-)
I should have said which naming service is used. JNDI is just an api not
a service.
Mike
> Hi,
>
[quoted text clipped - 11 lines]
> simply
> do not run. Any other examples would be appreciated.
I finally figured some of this out.
JNDI is part of the JDK. JDK1.5.0_03 comes with a number of naming service
providers.
This link helps explain a bunch.
http://java.sun.com/developer/technicalArticles/Programming/jndi/
Some services need to be manually started.
My question now is, if I create a ConnectionFactory for JMS using the admin
tool, how do I use it in a client that is standalone and also uses a
non-standard service? Or if I can't use it how do I create/bind the
ConnectionFactory programmatically? (I am not enough sure I am asking the
right questions.)
Mike
Mike Gaab - 24 Nov 2005 16:51 GMT
>> Hi,
>>
[quoted text clipped - 28 lines]
> ConnectionFactory programmatically? (I am not enough sure I am asking the
> right questions.)
If I am using "com.sun.jndi.cosnaming.CNCtxFactory" as the initialcontext,
how can I lookup a ConnectionFactory that was created using the JMS admin
tool?
MIke
Mike Gaab - 25 Nov 2005 08:29 GMT
>>> Hi,
>>>
[quoted text clipped - 34 lines]
> how can I lookup a ConnectionFactory that was created using the JMS admin
> tool?
ActiveMQ addressed this problem in their jndi.properties file.
They had entries for the JNDI names of connection factories, topics
and queues. I am not sure if this is standard but was something I
had been having trouble with since the application I am writing is
outside of the j2ee server.
Mike