I am able to lookup a remote ejb from a standalone java progarm. I have written something like this:
Properties props = new Properties();
Context ctx =new InitialContext(props);
HelloHome home = (HelloHome) ctx.lookup("Hello");
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 :-)
what do you mean? There is no such thing to do to make it work.
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?
yes, but if you want to really use HA-JNDI and not simply JNDI, either:
- indicate :1100
- indicate NOTHING AT ALL
in the last case, automatic discovery will be used.
Interesting. We have been using 1099 and it seems to work. What does using 1100 do in terms of clustering that 1099 doesn't?
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.
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.
I managed to figure out the problem. It was due to conflicting classes in the classpath. The lookup is working fine now.
I am getting exactly the same problem. Can you explain what do you mean by 'conflicting classes'?
make sure your classpath is EMPTY when starting JBoss