-
1. Re: JNDI lookup problem
monu Jun 28, 2003 4:17 AM (in response to radhikamehta)I am able to lookup a remote ejb from a standalone java progarm. I have written something like this:
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "RemoteServer:1100");
props.put("java.naming.rmi.security.manager", "yes");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");
Context ctx =new InitialContext(props);
HelloHome home = (HelloHome) ctx.lookup("Hello");
Regards,
Monu -
2. Re: JNDI lookup problem
radhikamehta Jun 30, 2003 3:28 AM (in response to radhikamehta)I just found that we have to configure the machine IP in deploy/cluster.xml. I was not able to lookup coz of this
problem, though I think this should not have been there..
well it is working now :-) -
3. Re: JNDI lookup problem
slaboure Jun 30, 2003 4:41 PM (in response to radhikamehta)what do you mean? There is no such thing to do to make it work.
sacha -
4. Re: JNDI lookup problem
buckman1 Jun 30, 2003 5:30 PM (in response to radhikamehta)Maybe I am missing something, but we use a jndi.properties file, and all of our ports indicate :1099, not :1100. I am having no problems connecting from our fat Swing client to the various jboss clustered nodes (4 in total) with nothing more than specifying the ip:1099,ip2:1099,ip3:1099 in the jndi.properties file.
Am I not understanding something here? -
5. Re: JNDI lookup problem
slaboure Jul 4, 2003 2:06 PM (in response to radhikamehta)yes, but if you want to really use HA-JNDI and not simply JNDI, either:
- indicate :1100
or
- indicate NOTHING AT ALL
in the last case, automatic discovery will be used.
Cheers,
sacha -
6. Re: JNDI lookup problem
buckman1 Jul 7, 2003 12:27 PM (in response to radhikamehta)Interesting. We have been using 1099 and it seems to work. What does using 1100 do in terms of clustering that 1099 doesn't?
-
7. Re: JNDI lookup problem
slaboure Jul 8, 2003 12:59 PM (in response to radhikamehta)the proxy is non-clustered and if something is bound to HA-JNDI and not JNDI, it will not be found. In the same way, if something is bound to only ONE of the JNDI tree (non-homogeneous deployment), it may not be found if you are not using the good JNDI tree.
cheers, sacha -
8. Re: JNDI lookup problem
sdev Jul 10, 2003 12:04 PM (in response to radhikamehta)Hi,
I deployed a stateless sb with tag as true in jboss-3.0.7_jakarta-tomcat-4.1.24. I have written a standalone client to lookup the bean by using the HA-JNDI context on 1100 port.
Still i am getting a javax.naming.NameNotFoundException from org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:214)
Interestingly, if i try to lookup the bean using context on port 1100 without enabling the cluster setting for the bean in jboss.xml, the lookup is working fine.
Am i missing any configuration.
Thanks in advance. -
9. Re: JNDI lookup problem
sdev Jul 21, 2003 5:43 AM (in response to radhikamehta)I managed to figure out the problem. It was due to conflicting classes in the classpath. The lookup is working fine now.
-
10. Re: JNDI lookup problem
satish_misc Aug 15, 2003 8:35 AM (in response to radhikamehta)I am getting exactly the same problem. Can you explain what do you mean by 'conflicting classes'?
-
11. Re: JNDI lookup problem
slaboure Aug 19, 2003 1:13 PM (in response to radhikamehta)make sure your classpath is EMPTY when starting JBoss