[jboss-user] [JNDI/Naming/Network] - javax.naming .NameNotFoundException

DrGorb do-not-reply at jboss.com
Wed Oct 17 17:06:40 EDT 2007


I have deployed an EJB in an EAR and I know JBoss has accepted it as I can see it in the JMX console:
+- ejb3-tutorialEAR (class: org.jnp.interfaces.NamingContext)
  |   +- TravelAgentBean (class: org.jnp.interfaces.NamingContext)
  |   |   +- remote (proxy: $Proxy71 implements interface com.titan.travelagent.TravelAgentRemote,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)

I wrote a small client to try this out and get  a javax.naming.NameNotFoundException: TravelAgentBean not bound

here is the code for the client:

    public static void main(String [] args) {
        try {
            Properties p = new Properties( );
            p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
            p.put(Context.URL_PKG_PREFIXES, " org.jboss.naming:org.jnp.interfaces");
            p.put(Context.PROVIDER_URL, "jnp://localhost:1099");
            
            Context jndiContext = new InitialContext(p);

            Object ref = jndiContext.lookup("TravelAgentBean/remote");


Thank you very much for your support.

Micha Roon



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

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



More information about the jboss-user mailing list