Iam trying to execute simple jms programs in WSAD.
I write simple Sender and Receiver programs and started the WSAD test envirinment and set the JNDI names for QueueConnctionFactory, Queue.
Now my doubt is how to lookup QueueConnectionFactor in my programs.
I tried as follows,
queueConnectionFactory = (QueueConnectionFactory)
queue = (Queue) jndiContext.lookup("Java:comp/env/queueName");
but it is giving error
JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify
class name in environment or system property, or as an applet parameter, or in a
n application resource file: java.naming.factory.initial
plz give me suitable answer.....
I am not sure this is the answer to your issue or not....but when I did a JNDI lookup to a JMS queue on WebSphere I had to add some WebSphere specific stuff to the lookup:
System.out.println("Setting WebSphere specific properties");
Properties props = new java.util.Properties();
System.out.println("Setting variables for this particular test");
System.out.println("Getting the InitalContext()");
jndiContext = new InitialContext(props);
Maybe this will help....