1 Reply Latest reply on May 28, 2012 11:41 AM by Andy Taylor

    Context lookup with JBoss AS7

    Laura delli Paoli Master

      Hello Everybody,

      Im' trying to develop a simple producer consumer application with JBoss and HornetQ.

      My problem is that I get a "Class not found exception" when I perform the "lookup" method.

      Here are some lines from my init() method:


        Hashtable<String, String> env = new Hashtable<String, String>();

                                    env.put(Context.INITIAL_CONTEXT_FACTORY          , "org.jnp.interfaces.NamingContextFactory");

                                    env.put(Context.PROVIDER_URL                              , "jnp://localhost:1099");


                                    //Jboss context reference

                                    initContex_ = new InitialContext(env);

                                    queue_ = (javax.jms.Queue)initContex_.lookup(HelloQueue);


      I read that in JBoss AS7 i cannot use jnp.

      Can anyone suggest me how to create a working initial context?





      I attached my JBoss Configuration.