I want to implement and run the JMS durable topic example from web page
http://www.ubookcase.com/book/Sams/JBoss.4.0.The.Official.Guide/0672326485/ch06lev1sec1.html
Listing 6.5
It seems to me that there is the jndi.properties file required to run this xample as well. What should I put into this jndi.properties file ?
When I try to run the SubscriberClient I get an error (See bottom):
Or are there any other config files which I have to setup for a durable topic JMS sample ?
Thomas
Begin TopicRecvClient, now=1179157312437
Begin recvSync
Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at ptest.jms.topic_sendrecvsplit.SubscriberClient.setupPubSub(SubscriberClient.java:33)
at ptest.jms.topic_sendrecvsplit.SubscriberClient.recvSync(SubscriberClient.java:46)
at ptest.jms.topic_sendrecvsplit.SubscriberClient.main(SubscriberClient.java:71)
The jndi.properties file ships with JBoss server and should work, assuming you didn't change any ports.