[jboss-user] [Messaging, JMS & JBossMQ] - How to setup jndi.properties for JMS durable topics?

thoste do-not-reply at jboss.com
Mon May 14 12:03:29 EDT 2007


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)




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045536#4045536

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045536



More information about the jboss-user mailing list