Dear Folks:

I'm a rookie user of Jboss and JMS. I'm trying the attached simple code
fragment.  

When I try to execute the line:

topicConnectionFactory = (TopicConnectionFactory)
                jndiContext.lookup("TopicConnectionFactory");

 I get the following exception:

JNDI lookup failed: 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


Any help would be appreciated.

Thanks,
Chris Jones

         */
        try {
            jndiContext = new InitialContext();
        } catch (NamingException e) {
            System.out.println("Could not create JNDI " +
                "context: " + e.toString());
            System.exit(1);
        }
        
        /* 
         * Look up connection factory and topic.  If either does
         * not exist, exit.
         */
        try {
            topicConnectionFactory = (TopicConnectionFactory)
                jndiContext.lookup("TopicConnectionFactory");
            topic = (Topic) jndiContext.lookup(topicName);
        } catch (NamingException e) {
            System.out.println("JNDI lookup failed: " +
                e.toString());
            System.exit(1);
        }
Chris Jones
Chief Architect
Supply Chain Business
Aspen Technology
19204 North Creek Parkway
Bothell, WA 98011
425-492-2239
425-492-2100 (fax)
[EMAIL PROTECTED]


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to